aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorRobert Shearman <rshearma@brocade.com>2017-01-26 13:02:24 -0500
committerDavid S. Miller <davem@davemloft.net>2017-01-30 15:00:58 -0500
commit63a6fff353d01da5a22b72670c434bf12fa0e3b8 (patch)
tree5707ae376777271ab2d77411fed89afb515f0257 /Documentation
parenta3a4de056ed5cfb22085173d8f0f13b0ca6b6d60 (diff)
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 'Documentation')
-rw-r--r--Documentation/networking/ip-sysctl.txt7
-rw-r--r--Documentation/networking/vrf.txt7
2 files changed, 11 insertions, 3 deletions
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index 17f2e7791042..fc73eeb7b3b8 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -721,6 +721,13 @@ tcp_challenge_ack_limit - INTEGER
721 721
722UDP variables: 722UDP variables:
723 723
724udp_l3mdev_accept - BOOLEAN
725 Enabling this option allows a "global" bound socket to work
726 across L3 master domains (e.g., VRFs) with packets capable of
727 being received regardless of the L3 domain in which they
728 originated. Only valid when the kernel was compiled with
729 CONFIG_NET_L3_MASTER_DEV.
730
724udp_mem - vector of 3 INTEGERs: min, pressure, max 731udp_mem - vector of 3 INTEGERs: min, pressure, max
725 Number of pages allowed for queueing by all UDP sockets. 732 Number of pages allowed for queueing by all UDP sockets.
726 733
diff --git a/Documentation/networking/vrf.txt b/Documentation/networking/vrf.txt
index 755dab856392..3918dae964d4 100644
--- a/Documentation/networking/vrf.txt
+++ b/Documentation/networking/vrf.txt
@@ -98,10 +98,11 @@ VRF device:
98 98
99or to specify the output device using cmsg and IP_PKTINFO. 99or to specify the output device using cmsg and IP_PKTINFO.
100 100
101TCP services running in the default VRF context (ie., not bound to any VRF 101TCP & UDP services running in the default VRF context (ie., not bound
102device) can work across all VRF domains by enabling the tcp_l3mdev_accept 102to any VRF device) can work across all VRF domains by enabling the
103sysctl option: 103tcp_l3mdev_accept and udp_l3mdev_accept sysctl options:
104 sysctl -w net.ipv4.tcp_l3mdev_accept=1 104 sysctl -w net.ipv4.tcp_l3mdev_accept=1
105 sysctl -w net.ipv4.udp_l3mdev_accept=1
105 106
106netfilter rules on the VRF device can be used to limit access to services 107netfilter rules on the VRF device can be used to limit access to services
107running in the default VRF context as well. 108running in the default VRF context as well.