diff options
author | Robert Shearman <rshearma@brocade.com> | 2017-01-26 18:02:24 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-30 15:00:58 -0500 |
commit | 63a6fff353d01da5a22b72670c434bf12fa0e3b8 (patch) | |
tree | 5707ae376777271ab2d77411fed89afb515f0257 /include/net/netns | |
parent | a3a4de056ed5cfb22085173d8f0f13b0ca6b6d60 (diff) | |
download | op-kernel-dev-63a6fff353d01da5a22b72670c434bf12fa0e3b8.zip op-kernel-dev-63a6fff353d01da5a22b72670c434bf12fa0e3b8.tar.gz |
net: Avoid receiving packets with an l3mdev on unbound UDP sockets
Packets arriving in a VRF currently are delivered to UDP sockets that
aren't bound to any interface. TCP defaults to not delivering packets
arriving in a VRF to unbound sockets. IP route lookup and socket
transmit both assume that unbound means using the default table and
UDP applications that haven't been changed to be aware of VRFs may not
function correctly in this case since they may not be able to handle
overlapping IP address ranges, or be able to send packets back to the
original sender if required.
So add a sysctl, udp_l3mdev_accept, to control this behaviour with it
being analgous to the existing tcp_l3mdev_accept, namely to allow a
process to have a VRF-global listen socket. Have this default to off
as this is the behaviour that users will expect, given that there is
no explicit mechanism to set unmodified VRF-unaware application into a
default VRF.
Signed-off-by: Robert Shearman <rshearma@brocade.com>
Acked-by: David Ahern <dsa@cumulusnetworks.com>
Tested-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/netns')
-rw-r--r-- | include/net/netns/ipv4.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index e365732..622d2da 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h @@ -124,6 +124,10 @@ struct netns_ipv4 { struct inet_timewait_death_row tcp_death_row; int sysctl_max_syn_backlog; +#ifdef CONFIG_NET_L3_MASTER_DEV + int sysctl_udp_l3mdev_accept; +#endif + int sysctl_igmp_max_memberships; int sysctl_igmp_max_msf; int sysctl_igmp_llm_reports; |