netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 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

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).