From: David Miller <davem@davemloft.net>
To: chiachi@android.com
Cc: john.dykstra1@gmail.com, akpm@linux-foundation.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] net: Keep interface binding when sending packets with ipi_ifindex = 0
Date: Tue, 04 Aug 2009 19:33:44 -0700 (PDT) [thread overview]
Message-ID: <20090804.193344.71849943.davem@davemloft.net> (raw)
In-Reply-To: <6c039e090908041706p6f06ac55ja796ac53855e829a@mail.gmail.com>
From: Chia-chi Yeh (葉家齊) <chiachi@android.com>
Date: Wed, 5 Aug 2009 08:06:25 +0800
> 2009/8/5 David Miller <davem@davemloft.net>:
>> I think we really cannot change behavior here. If the user specifies
>> "0" in ipi_ifindex we must respect that in ipc->oif. This is an
>> override, and the ability to override is the very purpose of this
>> control message.
>>
>> Even GLIBC makes use of that case of specifying "0" in ipi_ifindex.
>> We must respect it.
>>
>> I'm not applying any of these patches, sorry.
>>
>
> If you treat ipi_ifindex as an override, do you want to do that in
> ipi6_ifindex as well? Also, CAP_NET_RAW check for SO_BINDTODEVICE
> becomes meaningless in this case.
ipi_ifindex influences routing decisions, it doesn't also influence
socket matching like SO_BINDTODEVICE does.
That's the crucial difference.
This interface index gets passed into the routing lookup and that is
completely harmless to allow users to do.
About ipv6 it is indeed an important issue, because apps that work now
with ipv4's behavior are going to break if they care about this case
when they start using ipv6. Probably the thing to do is make ipv6
work the same as ipv4.
> I did not find the usage of ipi_ifindex in glibc. It would be great if
> you can give me some pointers. Thanks for your help.
If grep is broken on your system, I'm sorry to hear that:
find . -type f | xargs egrep IP_PKTINFO
Give that a try on your glibc tree.
prev parent reply other threads:[~2009-08-05 2:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <6c039e090907231439t1def08a4n10978733bee55bec@mail.gmail.com>
2009-07-27 21:44 ` [PATCH] net: Keep interface binding when sending packets with ipi_ifindex = 0 Andrew Morton
2009-07-30 0:10 ` John Dykstra
2009-08-04 4:23 ` David Miller
2009-08-04 7:36 ` Chia-chi Yeh (葉家齊)
2009-08-04 7:57 ` Badalian Vyacheslav
2009-08-04 8:28 ` Chia-chi Yeh (葉家齊)
2009-08-04 18:57 ` David Miller
2009-08-05 0:06 ` Chia-chi Yeh (葉家齊)
2009-08-05 2:33 ` David Miller [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=20090804.193344.71849943.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=akpm@linux-foundation.org \
--cc=chiachi@android.com \
--cc=john.dykstra1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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).