From: ebiederm@xmission.com (Eric W. Biederman)
To: roopa <roopa@cumulusnetworks.com>
Cc: stephen@networkplumber.org, davem@davemloft.net,
rshearma@brocade.com, netdev@vger.kernel.org,
vivek@cumulusnetworks.com
Subject: Re: [PATCH net v3 2/2] mpls: fix mpls route deletes to not check for route scope
Date: Tue, 02 Jun 2015 17:59:32 -0500 [thread overview]
Message-ID: <874mmphg2z.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <556E282E.2040501@cumulusnetworks.com> (roopa@cumulusnetworks.com's message of "Tue, 02 Jun 2015 15:03:26 -0700")
roopa <roopa@cumulusnetworks.com> writes:
> On 6/2/15, 2:13 PM, Eric W. Biederman wrote:
>> So I just stopped and looked at what is happening. When you originally
>> reported this you said (or at least I understood) that rtm_scope was not
>> being set in iproute. I assumed that meant it was not being touched
>> and it was taking a default value of zero (or else it was possibly
>> floating). Having looked neither is true. iproute sets rtm_scope
>> to RT_SCOPE_NOWHERE during delete deliberately to act as a wild card.
>>
>> In the kernel in other protocols currently ipv4 treats RT_SCOPE_NOWHERE
>> as a wild card during delete, decnet treats RT_SCOPE_NOWHERE as a wild
>> card during delete, the remaining protocols (ipv6, phonet, and can) that
>> implement RTM_DELROUTE do not look at rtm_scope at all. Further ipv6
>> and phonet set rtm_scope to RT_SCOPE_UNIVERSE when dumped.
>>
>> Which says to me that we have semantics in the kernel that no one has
>> let userspace know about, and that scares me when there is a
>> misunderstanding between the kernel and userspace about what fields
>> mean. That inevitabily leads to bugs. The kind of bugs that I have
>> to create security fixes for recently.
>>
>> So I really think we should fix this in userspace so that that someone
>> reading iproute will have a chance at knowing that this scopes do not
>> exist in ipv6 and mpls and that scope logic is just noise in those
>> cases.
> ack, i did start with handling both type and scope
> in iproute2. I misunderstood you when you said you did not care
> abt the scope in earlier comments. so i made the kernel not care abt the
> scope. :) but only handled type in 'iproute2' in v2. now its clear. I do have a
> similar patch like below.
> sorry abt the iterations. I will respin (If you prefer to post your below patch
> yourself, pls do. I am ok either way. Thanks.
I don't have enough energy to follow through with more than review
today.
Eric
prev parent reply other threads:[~2015-06-02 23:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-02 6:29 [PATCH net v3 2/2] mpls: fix mpls route deletes to not check for route scope Roopa Prabhu
2015-06-02 21:13 ` Eric W. Biederman
2015-06-02 22:03 ` roopa
2015-06-02 22:59 ` Eric W. Biederman [this message]
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=874mmphg2z.fsf@x220.int.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.com \
--cc=rshearma@brocade.com \
--cc=stephen@networkplumber.org \
--cc=vivek@cumulusnetworks.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).