All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Haley <brian.haley@hp.com>
To: "Erich E. Hoover" <ehoover@mines.edu>
Cc: Linux Netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH v3 2/2] Implement IPV6_UNICAST_IF socket option.
Date: Mon, 06 Feb 2012 22:00:05 -0500	[thread overview]
Message-ID: <4F3093B5.5070801@hp.com> (raw)
In-Reply-To: <CAEU2+vr823WcoF_Z4NV7ptWNBQ4uTG+tD2VAXbQPDYGqsaKpLQ@mail.gmail.com>

On 02/06/2012 05:11 PM, Erich E. Hoover wrote:
> On Mon, Feb 6, 2012 at 2:13 PM, Brian Haley <brian.haley@hp.com> wrote:
>> On 02/06/2012 12:57 PM, Erich E. Hoover wrote:
>>> ...
>>> +     int                     outif_index;
>> ...
>> Nitpick: is ucast_oif a better name?
> 
> I templated off of the IPv4 code (example: mc_index), but I do think
> that that is a better name.  Should I call the IPv4 version
> "ucast_index" or have the same name for both IPv4 and IPv6?

If it was me I'd call it uc_index for IPv4, to mimic mc_ifindex.

>>> diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
>>> index 01d46bf..18f144e 100644
>>> --- a/net/ipv6/icmp.c
>>> +++ b/net/ipv6/icmp.c
>>> @@ -551,6 +551,9 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
>>>               return;
>>>       np = inet6_sk(sk);
>>>
>>> +     if (!fl6.flowi6_oif)
>>> +             fl6.flowi6_oif = ipv6_default_ifindex(sk);
>>> +
>>>       if (!fl6.flowi6_oif && ipv6_addr_is_multicast(&fl6.daddr))
>>>               fl6.flowi6_oif = np->mcast_oif;
>>
>> This snippet shows (and rawv6_sendmsg() has the same problem), that
>> IPV6_UNICAST_IF can also affect multicast packets.  And I think we always want
>> SO_BINDTODEVICE to override them all.  Perhaps these checks should be:
>> ...
> 
> I'll double check all of these tonight, but a cursory look seems to
> indicate that the multicast check is the right place to put this for
> all the files.  I'm sorry about that, I clearly didn't consider
> interfering with multicast.

It's probably important to keep the precedence the same as before:

	SO_BINDTODEVICE
	IPV6_PKTINFO
	IPV6_*CAST_IF

It looks like your IPv4 changes have the same problem.

-Brian

  reply	other threads:[~2012-02-07  3:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-06 17:57 [PATCH v3 2/2] Implement IPV6_UNICAST_IF socket option Erich E. Hoover
2012-02-06 21:13 ` Brian Haley
2012-02-06 22:11   ` Erich E. Hoover
2012-02-07  3:00     ` Brian Haley [this message]
2012-02-07  3:23       ` Erich E. Hoover

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=4F3093B5.5070801@hp.com \
    --to=brian.haley@hp.com \
    --cc=ehoover@mines.edu \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.