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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Mar 2018 16:10:41 +0000 (18:10 +0200)
commit474aa5149753393c97ac01780cfb234194d5b91c
tree8e3b0636ce77077587e2954635fec79d9b609cd5
parent06d3f43d52bbf58dd040c7612ac7372cf6649208
net: Only honor ifindex in IP_PKTINFO if non-0

[ Upstream commit 2cbb4ea7de167b02ffa63e9cdfdb07a7e7094615 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/ip_sockglue.c