net: Only honor ifindex in IP_PKTINFO if non-0
authorDavid Ahern <dsahern@gmail.com>
Fri, 16 Feb 2018 19:03:03 +0000 (11:03 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Feb 2018 21:42:17 +0000 (16:42 -0500)
commit1cbec07649ec8c267cdfb486ab4ee73949974ca4
tree40486285e2433d9ceb26485f1351d19d099bd997
parentb2d12101bff95c27960c69f3e54a98afdc205bb3
net: Only honor ifindex in IP_PKTINFO if non-0

Only allow ifindex from IP_PKTINFO to override SO_BINDTODEVICE settings
if the index is actually set in the message.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_sockglue.c