NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/38791: routing socket event header not cleared



The following reply was made to PR kern/38791; it has been noted by GNATS.

From: Michael van Elst <mlelstv%henery.1st.de@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/38791: routing socket event header not cleared
Date: Sun, 1 Jun 2008 20:07:46 +0200

 Maybe this?
 
 Index: sys/net/rtsock.c
 ===================================================================
 RCS file: /cvsroot/src/sys/net/rtsock.c,v
 retrieving revision 1.106
 diff -u -r1.106 rtsock.c
 --- sys/net/rtsock.c   29 May 2008 17:53:01 -0000      1.106
 +++ sys/net/rtsock.c   1 Jun 2008 18:06:50 -0000
 @@ -584,9 +584,10 @@
                m->m_pkthdr.len = m->m_len = len;
        }
        m->m_pkthdr.rcvif = NULL;
 -      m_copyback(m, 0, datalen, data);
        rtm = mtod(m, struct rt_msghdr *);
 -      (void)memset(rtm, 0, len);
 +      if (len > datalen)
 +              (void)memset(rtm, datalen, len - datalen);
 +      m_copyback(m, 0, datalen, data);
        for (i = 0; i < RTAX_MAX; i++) {
                if ((sa = rtinfo->rti_info[i]) == NULL)
                        continue;
 
 -- 
                                 Michael van Elst
 Internet: mlelstv%serpens.de@localhost
                                 "A potential Snark may lurk in every tree."
 


Home | Main Index | Thread Index | Old Index