Re: [PATCH v3] net: Require exact match for TCP socket lookups if dif is l3mdev

2016-10-15 Thread David Miller
From: David Ahern Date: Sat, 15 Oct 2016 17:07:53 -0600 > I believe at netconf someone mentioned it would be a great day when > something is done for IPv6 first and IPv4 was a follow on. Here you > go. :-) :-) > I can rename the existing one to skb_l3mdev_slave_6 and make the new > one skb_l3md

Re: [PATCH v3] net: Require exact match for TCP socket lookups if dif is l3mdev

2016-10-15 Thread David Ahern
On 10/15/16 3:46 PM, David Miller wrote: > From: David Ahern > Date: Fri, 14 Oct 2016 12:29:19 -0700 > >> +/* can not be used in TCP layer after tcp_v6_fill_cb */ >> +static inline bool inet6_exact_dif_match(struct net *net, struct sk_buff >> *skb) >> +{ >> +#if defined(CONFIG_NET_L3_MASTER_DEV)

Re: [PATCH v3] net: Require exact match for TCP socket lookups if dif is l3mdev

2016-10-15 Thread David Miller
From: David Ahern Date: Fri, 14 Oct 2016 12:29:19 -0700 > +/* can not be used in TCP layer after tcp_v6_fill_cb */ > +static inline bool inet6_exact_dif_match(struct net *net, struct sk_buff > *skb) > +{ > +#if defined(CONFIG_NET_L3_MASTER_DEV) > + if (!net->ipv4.sysctl_tcp_l3mdev_accept &&

[PATCH v3] net: Require exact match for TCP socket lookups if dif is l3mdev

2016-10-14 Thread David Ahern
Currently, socket lookups for l3mdev (vrf) use cases can match a socket that is bound to a port but not a device (ie., a global socket). If the sysctl tcp_l3mdev_accept is not set this leads to ack packets going out based on the main table even though the packet came in from an L3 domain. The end r