Ticket #342: routing_bug

File routing_bug, 2.3 KB (added by mikes, on 12/03/06 at 13:31:12)

routing_bug

Line 
1From - Thu Feb  6 11:10:27 2003
2Return-Path: <rtems-users-return-6539-joel.sherrill=oarcorp.com@oarcorp.com>
3Delivered-To: joel@mail.oarcorp.com
4Received: (qmail 11162 invoked by alias); 6 Feb 2003 15:08:47 -0000
5Delivered-To: joel.sherrill@oarcorp.com
6Received: (qmail 11111 invoked by uid 330); 6 Feb 2003 15:08:46 -0000
7Mailing-List: contact rtems-users-help@oarcorp.com; run by ezmlm
8Precedence: bulk
9X-No-Archive: yes
10List-Post: <mailto:rtems-users@oarcorp.com>
11List-Help: <mailto:rtems-users-help@oarcorp.com>
12List-Unsubscribe: <mailto:rtems-users-unsubscribe@oarcorp.com>
13List-Subscribe: <mailto:rtems-users-subscribe@oarcorp.com>
14Delivered-To: mailing list rtems-users@oarcorp.com
15Received: (qmail 11105 invoked from network); 6 Feb 2003 15:08:46 -0000
16Date: Thu, 6 Feb 2003 09:09:24 -0600
17Message-ID: <IGEBLLKBHLNKJHDJNDEAOEIKCIAA.mikes@poliac.com>
18From: "Mike Siers" <mikes@poliac.com>
19To: rtems-users@oarcorp.com
20Subject: Network Routing Bug
21MIME-Version: 1.0
22Content-Type: text/plain;
23        charset="iso-8859-1"
24Content-Transfer-Encoding: 7bit
25X-Priority: 3 (Normal)
26X-MSMail-Priority: Normal
27X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
28X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
29Importance: Normal
30
31
32Hi All,
33I think I found a small bug in the RTEMS version of the function
34m_copyback().  I am using the rtems-ss-20021118 snapshot.
35
36The RTEMS version of the m_copyback is changing the m_len value of
37the mbuf.  I looked into the source from another BSD system and
38the mbuf length is not changed inside this function. 
39
40The m_copyback function is only being used in the net/rtsock.c file.
41So I think this problem is only visable under certain routing table
42conditions. 
43
44Below is my patch to fix the problem. The uipc_mbuf.c file is located
45in the cpukit/libnetworking/kern directory.  Please review and let
46me know if you think this the correct fix.
47
48Thanks
49Mike Siers
50
51==============================================
52--- uipc_mbuf.c Sat Nov  2 10:27:43 2002
53+++ uipc_mbuf.new       Thu Feb  6 08:50:46 2003
54@@ -755,7 +755,7 @@
55                off = 0;
56                totlen += mlen;
57                if (len == 0) {
58-                       m->m_len = mlen;
59+                       /* m->m_len = mlen; */
60                        break;
61                }
62                if (m->m_next == 0) {
63@@ -767,7 +767,7 @@
64                        n->m_len = min(MLEN, len);
65                        m->m_next = n;
66                }
67-               m->m_len = mlen;
68+               /* m->m_len = mlen; */
69                m = m->m_next;
70        }
71 /*out:*/