diff options
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 49e008568ddf..137b8eb666b7 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -92,6 +92,7 @@ | |||
92 | #include <linux/jhash.h> | 92 | #include <linux/jhash.h> |
93 | #include <linux/rcupdate.h> | 93 | #include <linux/rcupdate.h> |
94 | #include <linux/times.h> | 94 | #include <linux/times.h> |
95 | #include <net/dst.h> | ||
95 | #include <net/net_namespace.h> | 96 | #include <net/net_namespace.h> |
96 | #include <net/protocol.h> | 97 | #include <net/protocol.h> |
97 | #include <net/ip.h> | 98 | #include <net/ip.h> |
@@ -2357,12 +2358,6 @@ static struct dst_ops ipv4_dst_blackhole_ops = { | |||
2357 | }; | 2358 | }; |
2358 | 2359 | ||
2359 | 2360 | ||
2360 | static int ipv4_blackhole_output(struct sk_buff *skb) | ||
2361 | { | ||
2362 | kfree_skb(skb); | ||
2363 | return 0; | ||
2364 | } | ||
2365 | |||
2366 | static int ipv4_dst_blackhole(struct rtable **rp, struct flowi *flp, struct sock *sk) | 2361 | static int ipv4_dst_blackhole(struct rtable **rp, struct flowi *flp, struct sock *sk) |
2367 | { | 2362 | { |
2368 | struct rtable *ort = *rp; | 2363 | struct rtable *ort = *rp; |
@@ -2374,8 +2369,8 @@ static int ipv4_dst_blackhole(struct rtable **rp, struct flowi *flp, struct sock | |||
2374 | 2369 | ||
2375 | atomic_set(&new->__refcnt, 1); | 2370 | atomic_set(&new->__refcnt, 1); |
2376 | new->__use = 1; | 2371 | new->__use = 1; |
2377 | new->input = ipv4_blackhole_output; | 2372 | new->input = dst_discard; |
2378 | new->output = ipv4_blackhole_output; | 2373 | new->output = dst_discard; |
2379 | memcpy(new->metrics, ort->u.dst.metrics, RTAX_MAX*sizeof(u32)); | 2374 | memcpy(new->metrics, ort->u.dst.metrics, RTAX_MAX*sizeof(u32)); |
2380 | 2375 | ||
2381 | new->dev = ort->u.dst.dev; | 2376 | new->dev = ort->u.dst.dev; |