From: "Randy.Dunlap" <rddunlap@osdl.org>
To: linux-net@vger.kernel.org
Cc: netdev@oss.sgi.com
Subject: confuzed bit flags
Date: Thu, 8 May 2003 15:30:32 -0700 [thread overview]
Message-ID: <20030508153032.06e7c98a.rddunlap@osdl.org> (raw)
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
next reply other threads:[~2003-05-08 22:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-08 22:30 Randy.Dunlap [this message]
2003-05-08 22:41 ` confuzed bit flags David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030508153032.06e7c98a.rddunlap@osdl.org \
--to=rddunlap@osdl.org \
--cc=linux-net@vger.kernel.org \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).