diff options
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 20083e0d3995..ac70e2d3b10c 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -152,7 +152,6 @@ struct rt6_info ip6_null_entry = { | |||
152 | 152 | ||
153 | static int ip6_pkt_prohibit(struct sk_buff *skb); | 153 | static int ip6_pkt_prohibit(struct sk_buff *skb); |
154 | static int ip6_pkt_prohibit_out(struct sk_buff *skb); | 154 | static int ip6_pkt_prohibit_out(struct sk_buff *skb); |
155 | static int ip6_pkt_blk_hole(struct sk_buff *skb); | ||
156 | 155 | ||
157 | struct rt6_info ip6_prohibit_entry = { | 156 | struct rt6_info ip6_prohibit_entry = { |
158 | .u = { | 157 | .u = { |
@@ -181,8 +180,8 @@ struct rt6_info ip6_blk_hole_entry = { | |||
181 | .obsolete = -1, | 180 | .obsolete = -1, |
182 | .error = -EINVAL, | 181 | .error = -EINVAL, |
183 | .metrics = { [RTAX_HOPLIMIT - 1] = 255, }, | 182 | .metrics = { [RTAX_HOPLIMIT - 1] = 255, }, |
184 | .input = ip6_pkt_blk_hole, | 183 | .input = dst_discard, |
185 | .output = ip6_pkt_blk_hole, | 184 | .output = dst_discard, |
186 | .ops = &ip6_dst_ops, | 185 | .ops = &ip6_dst_ops, |
187 | .path = (struct dst_entry*)&ip6_blk_hole_entry, | 186 | .path = (struct dst_entry*)&ip6_blk_hole_entry, |
188 | } | 187 | } |
@@ -782,12 +781,6 @@ struct dst_entry * ip6_route_output(struct sock *sk, struct flowi *fl) | |||
782 | 781 | ||
783 | EXPORT_SYMBOL(ip6_route_output); | 782 | EXPORT_SYMBOL(ip6_route_output); |
784 | 783 | ||
785 | static int ip6_blackhole_output(struct sk_buff *skb) | ||
786 | { | ||
787 | kfree_skb(skb); | ||
788 | return 0; | ||
789 | } | ||
790 | |||
791 | int ip6_dst_blackhole(struct sock *sk, struct dst_entry **dstp, struct flowi *fl) | 784 | int ip6_dst_blackhole(struct sock *sk, struct dst_entry **dstp, struct flowi *fl) |
792 | { | 785 | { |
793 | struct rt6_info *ort = (struct rt6_info *) *dstp; | 786 | struct rt6_info *ort = (struct rt6_info *) *dstp; |
@@ -800,8 +793,8 @@ int ip6_dst_blackhole(struct sock *sk, struct dst_entry **dstp, struct flowi *fl | |||
800 | 793 | ||
801 | atomic_set(&new->__refcnt, 1); | 794 | atomic_set(&new->__refcnt, 1); |
802 | new->__use = 1; | 795 | new->__use = 1; |
803 | new->input = ip6_blackhole_output; | 796 | new->input = dst_discard; |
804 | new->output = ip6_blackhole_output; | 797 | new->output = dst_discard; |
805 | 798 | ||
806 | memcpy(new->metrics, ort->u.dst.metrics, RTAX_MAX*sizeof(u32)); | 799 | memcpy(new->metrics, ort->u.dst.metrics, RTAX_MAX*sizeof(u32)); |
807 | new->dev = ort->u.dst.dev; | 800 | new->dev = ort->u.dst.dev; |
@@ -1811,12 +1804,6 @@ static int ip6_pkt_prohibit_out(struct sk_buff *skb) | |||
1811 | return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES); | 1804 | return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES); |
1812 | } | 1805 | } |
1813 | 1806 | ||
1814 | static int ip6_pkt_blk_hole(struct sk_buff *skb) | ||
1815 | { | ||
1816 | kfree_skb(skb); | ||
1817 | return 0; | ||
1818 | } | ||
1819 | |||
1820 | #endif | 1807 | #endif |
1821 | 1808 | ||
1822 | /* | 1809 | /* |