net/ipv6: Do not allow route add with a device that is down
authorDavid Ahern <dsahern@gmail.com>
Thu, 25 Jan 2018 03:45:29 +0000 (19:45 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Jan 2018 21:22:02 +0000 (16:22 -0500)
commit955ec4cb3b54c7c389a9f830be7d3ae2056b9212
treedfce42ecd2ae158579862cd41f2d6320a5536245
parentbfd4b329acd5159077603d3f1873a7d761236d25
net/ipv6: Do not allow route add with a device that is down

IPv6 allows routes to be installed when the device is not up (admin up).
Worse, it does not mark it as LINKDOWN. IPv4 does not allow it and really
there is no reason for IPv6 to allow it, so check the flags and deny if
device is admin down.

Signed-off-by: David Ahern <dsahern@gmail.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c