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.
-- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
