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 <>
To: "J.T. Conklin" <>
Subject: Re: kern/38791 (routing socket event header not cleared)
Date: Mon, 2 Jun 2008 21:11:02 +0200

 On Mon, Jun 02, 2008 at 12:05:16PM -0700, J.T. Conklin wrote:
 > writes:
 > > Synopsis: routing socket event header not cleared
 > >
 > > State-Changed-From-To: closed->open
 > > State-Changed-By:
 > > State-Changed-When: Sun, 01 Jun 2008 16:51:01 +0000
 > > State-Changed-Why:
 > > The patch erases the whole message. Maybe clearing sizeof(rtm) is enough?
 > True, however this is essentially the same thing that callers to rt_msg2() 
 > do (to they structure they pass) when they build a route event.  Clearing
 > the whole message could conceivably fix problems where not all the event/
 > message payload data is being being zeroed too (althought this may not be
 > likely).
 > The total length of these messages are quite small, so any the extra cost
 > to zero the whole event should be similarly small.
 Let me clarify this: by erasing the message you erase the contents
 of the message that has been copied there two lines above with
 E.g. in case of RTM_IFINFO messages you overwrite the whole message
 with zeroes and thus break ifwatchd.
                                 Michael van Elst
                                 "A potential Snark may lurk in every tree."

Home | Main Index | Thread Index | Old Index