aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
authorMike Manning <mmanning@vyatta.att-mail.com>2018-11-07 15:36:03 +0000
committerDavid S. Miller <davem@davemloft.net>2018-11-07 16:12:38 -0800
commite78190581aff7c96fbd6324aa633170934650b65 (patch)
treedd38aa82e3597cf21d76ca4eba453bc83739aac9 /net/ipv4/udp.c
parentnet: allow binding socket in a VRF when there's an unbound socket (diff)
downloadlinux-dev-e78190581aff7c96fbd6324aa633170934650b65.tar.xz
linux-dev-e78190581aff7c96fbd6324aa633170934650b65.zip
net: ensure unbound stream socket to be chosen when not in a VRF
The commit a04a480d4392 ("net: Require exact match for TCP socket lookups if dif is l3mdev") only ensures that the correct socket is selected for packets in a VRF. However, there is no guarantee that the unbound socket will be selected for packets when not in a VRF. By checking for a device match in compute_score() also for the case when there is no bound device and attaching a score to this, the unbound socket is selected. And if a failure is returned when there is no device match, this ensures that bound sockets are never selected, even if there is no unbound socket. Signed-off-by: Mike Manning <mmanning@vyatta.att-mail.com> Reviewed-by: David Ahern <dsahern@gmail.com> Tested-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/udp.c')
0 files changed, 0 insertions, 0 deletions