David Young
2009-03-10 18:54:12 UTC
To make ammends, attached is a patch to fix this. It is intended for
pullup to netbsd-5.
And here is a different patch.pullup to netbsd-5.
We add a new function, rt_ifa_connected which returns 1 if the route is
the connected route (prefix, subnet, etc) for the ifa.
This makes the code in rtsock.c and route.c a lot simpler. I've also
added some debug messages via the existing RT_DPRINTF define.
For reference, I've also added a patch which applies this before my
origonal patch was comitted to show the intent of what we're trying to
do here.
I think this pretty much covers everything now. Anyone have any issues
with this before I commit?
before you commit.
Avoid accessing _rt_key except by using the accessor, rt_getkey().
Perhaps the following code logically belongs in rt_replace_ifa()?
+ if (oifa && oifa->ifa_flags & IFA_ROUTE &&
+ rt_ifa_connected(rt, oifa))
+ {
+ RT_DPRINTF("rt->_rt_key = %p, "
+ "change deleted IFA_ROUTE\n",
+ (void *)rt->_rt_key);
+ oifa->ifa_flags &= ~IFA_ROUTE;
+ if (rt_ifa_connected(rt, ifa)) {
+ RT_DPRINTF("rt->_rt_key = %p, "
+ "change added IFA_ROUTE\n",
+ (void *)rt->_rt_key);
ifa->ifa_flags |= IFA_ROUTE;
Dave
--
David Young OJC Technologies
***@ojctech.com Urbana, IL * (217) 278-3933
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
David Young OJC Technologies
***@ojctech.com Urbana, IL * (217) 278-3933
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de