* confuzed bit flags
@ 2003-05-08 22:30 Randy.Dunlap
2003-05-08 22:41 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Randy.Dunlap @ 2003-05-08 22:30 UTC (permalink / raw)
To: linux-net; +Cc: netdev
I'm confused or the source code is or both.
net/ipv6/ndisc.c sets
rt->rt6i_flags = RTF_LOCAL;
This is OK AFAIK since RTF_LOCAL is #defined in
./linux/ipv6_route.h:36:#define RTF_LOCAL 0x80000000
But then RTF_LOCAL is never used anywhere else. OK or not?
Further checking finds that net/ipv6/xfrm6_policy.c does this:
x->u.rt6.rt6i_flags = rt0->rt6i_flags&(RTCF_BROADCAST|RTCF_MULTICAST|RTCF_LOCAL);
but these RTCF_ bits are defined in include/linux/in_route.h,
which says:
/* IPv4 routing cache flags */
So it's nice or good that RTF_LOCAL and RTCF_LOCAL are both
#defined as 0x80000000. Right?
Oh, I see now that there's even a comment that might be applicable
to this <stuff>:
/* Sheit... I remember I did this right. Apparently,
* it was magically lost, so this code needs audit */
I guess that my (idealistic) position is that those RTCF_ bit flags
shouldn't be used here (in net/ipv6) at all. Am I off track on this?
--
~Randy
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: confuzed bit flags
2003-05-08 22:30 confuzed bit flags Randy.Dunlap
@ 2003-05-08 22:41 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2003-05-08 22:41 UTC (permalink / raw)
To: rddunlap; +Cc: linux-net, netdev
From: "Randy.Dunlap" <rddunlap@osdl.org>
Date: Thu, 8 May 2003 15:30:32 -0700
I'm confused or the source code is or both.
net/ipv6/ndisc.c sets
rt->rt6i_flags = RTF_LOCAL;
Any time you see some absolutely strange handling inside of ipv6
routing, it usually indicates a place where ipv4 routing does things
one way and the ipv6 side cannot implement things in that way for one
reason or another. Yet, some ipv4'lets remain in the ipv6 code,
almost as a marker to be mindful of this difference.
This RTF_LOCAL thing is just such a case.
In many ways the ipv6 routing code is lacking in features that
ipv4 routing has. I'm in fact right now killing on of them,
rtnetlink route metrics are ignored by ipv6.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-05-08 22:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-08 22:30 confuzed bit flags Randy.Dunlap
2003-05-08 22:41 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).