]> git.baikalelectronics.ru Git - kernel.git/commit
net: use loopback dev when generating blackhole route
authorWei Wang <weiwan@google.com>
Sat, 17 Jun 2017 17:42:26 +0000 (10:42 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 18 Jun 2017 02:53:59 +0000 (22:53 -0400)
commit89915e0bd3a5b9fb711204dbcac0dd7bf7e2fc44
treec8de21d5e5503a6cf665c658b012c6d28c1345dc
parent039f2477531eb38c114f369657568ef47b9a859b
net: use loopback dev when generating blackhole route

Existing ipv4/6_blackhole_route() code generates a blackhole route
with dst->dev pointing to the passed in dst->dev.
It is not necessary to hold reference to the passed in dst->dev
because the packets going through this route are dropped anyway.
A loopback interface is good enough so that we don't need to worry about
releasing this dst->dev when this dev is going down.

Signed-off-by: Wei Wang <weiwan@google.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/route.c
net/ipv6/route.c