public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: David Ahern <dsa@cumulusnetworks•com>
To: Tom Herbert <tom@herbertland•com>
Cc: Linux Kernel Network Developers <netdev@vger•kernel.org>,
	Shrijeet Mukherjee <shm@cumulusnetworks•com>,
	Roopa Prabhu <roopa@cumulusnetworks•com>
Subject: Re: [RFC net-next 4/4] net: ipv6: Initial support for VRFs
Date: Mon, 21 Sep 2015 18:18:07 -0600	[thread overview]
Message-ID: <56009E3F.90607@cumulusnetworks.com> (raw)
In-Reply-To: <CALx6S37hPDG1FLYXfLJgYcionA2oj+v1dLFaCVoP91qVrUUh7A@mail.gmail.com>

On 9/21/15 6:08 PM, Tom Herbert wrote:
>> diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
>> index 9aadd57808a5..11980ee57507 100644
>> --- a/net/ipv6/datagram.c
>> +++ b/net/ipv6/datagram.c
>> @@ -142,6 +142,10 @@ static int __ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int a
>>                          err = -EINVAL;
>>                          goto out;
>>                  }
>> +       } else if (sk->sk_bound_dev_if &&
>> +                  netif_index_is_l3_master(sock_net(sk),
>
> I suppose I have the same issues with this that were put in the IPv4
> code path. Core IPv6 code should not care about any specific network
> interfaces other than maybe loopback. Generalizing VPF to be l3m
> doesn't really address this point. Have you looked at abstracting more
> of this into the ndo functions (i.e. for source address selection) or
> routing lookup?

Socket binding to an interface makes the socket layer care somewhat 
about references to a device. For this case and the ipv4 version the 
flag needs to be set here because of what the connect function means for 
datagram sockets. Once you go down a layer (to L3/routing) there is no 
proper place to add this flag to the lookups.

      reply	other threads:[~2015-09-22  0:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-21 23:32 [RFC net-next 0/4] net: VRF support in IPv6 stack David Ahern
2015-09-21 23:32 ` [RFC net-next 1/4] l3mdev: ipv6 support David Ahern
2015-09-21 23:32 ` [RFC net-next 2/4] net: Remove use of IFF_SLAVE with L3 devices David Ahern
2015-09-21 23:32 ` [RFC net-next 3/4] net: VRF device: Initial IPv6 support David Ahern
2015-09-21 23:32 ` [RFC net-next 4/4] net: ipv6: Initial support for VRFs David Ahern
2015-09-22  0:08   ` Tom Herbert
2015-09-22  0:18     ` David Ahern [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=56009E3F.90607@cumulusnetworks.com \
    --to=dsa@cumulusnetworks$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=roopa@cumulusnetworks$(echo .)com \
    --cc=shm@cumulusnetworks$(echo .)com \
    --cc=tom@herbertland$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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