OSDN Git Service

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:12:33 +0000 (18:12 +0200)
commite582bbb7b4f0932c3289fe6fe63d7f5ed1822af9
treea2fa7f6e57b7bd294f3d4a8ddaec297b0cbe557b
parent335079e853133da6d757cef1db084981a615e533
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