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>
Tue, 6 Mar 2018 21:36:44 +0000 (16:36 -0500)
commit2cbb4ea7de167b02ffa63e9cdfdb07a7e7094615
tree385df61ab9a8c160adb47d0481dff0146cc2ee6a
parent22b8d8115d1b940d548a5fddcbce4cdd30083cfc
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