diff options
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 87c39c978cd0..d9baca062d24 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -53,6 +53,7 @@ | |||
53 | #include <linux/rtnetlink.h> | 53 | #include <linux/rtnetlink.h> |
54 | #include <net/dst.h> | 54 | #include <net/dst.h> |
55 | #include <net/xfrm.h> | 55 | #include <net/xfrm.h> |
56 | #include <net/netevent.h> | ||
56 | 57 | ||
57 | #include <asm/uaccess.h> | 58 | #include <asm/uaccess.h> |
58 | 59 | ||
@@ -742,6 +743,7 @@ static void ip6_rt_update_pmtu(struct dst_entry *dst, u32 mtu) | |||
742 | dst->metrics[RTAX_FEATURES-1] |= RTAX_FEATURE_ALLFRAG; | 743 | dst->metrics[RTAX_FEATURES-1] |= RTAX_FEATURE_ALLFRAG; |
743 | } | 744 | } |
744 | dst->metrics[RTAX_MTU-1] = mtu; | 745 | dst->metrics[RTAX_MTU-1] = mtu; |
746 | call_netevent_notifiers(NETEVENT_PMTU_UPDATE, dst); | ||
745 | } | 747 | } |
746 | } | 748 | } |
747 | 749 | ||
@@ -1155,6 +1157,7 @@ void rt6_redirect(struct in6_addr *dest, struct in6_addr *saddr, | |||
1155 | struct rt6_info *rt, *nrt = NULL; | 1157 | struct rt6_info *rt, *nrt = NULL; |
1156 | int strict; | 1158 | int strict; |
1157 | struct fib6_node *fn; | 1159 | struct fib6_node *fn; |
1160 | struct netevent_redirect netevent; | ||
1158 | 1161 | ||
1159 | /* | 1162 | /* |
1160 | * Get the "current" route for this destination and | 1163 | * Get the "current" route for this destination and |
@@ -1252,6 +1255,10 @@ restart: | |||
1252 | if (ip6_ins_rt(nrt, NULL, NULL, NULL)) | 1255 | if (ip6_ins_rt(nrt, NULL, NULL, NULL)) |
1253 | goto out; | 1256 | goto out; |
1254 | 1257 | ||
1258 | netevent.old = &rt->u.dst; | ||
1259 | netevent.new = &nrt->u.dst; | ||
1260 | call_netevent_notifiers(NETEVENT_REDIRECT, &netevent); | ||
1261 | |||
1255 | if (rt->rt6i_flags&RTF_CACHE) { | 1262 | if (rt->rt6i_flags&RTF_CACHE) { |
1256 | ip6_del_rt(rt, NULL, NULL, NULL); | 1263 | ip6_del_rt(rt, NULL, NULL, NULL); |
1257 | return; | 1264 | return; |
@@ -1525,6 +1532,10 @@ int ipv6_route_ioctl(unsigned int cmd, void __user *arg) | |||
1525 | 1532 | ||
1526 | static int ip6_pkt_discard(struct sk_buff *skb) | 1533 | static int ip6_pkt_discard(struct sk_buff *skb) |
1527 | { | 1534 | { |
1535 | int type = ipv6_addr_type(&skb->nh.ipv6h->daddr); | ||
1536 | if (type == IPV6_ADDR_ANY || type == IPV6_ADDR_RESERVED) | ||
1537 | IP6_INC_STATS(IPSTATS_MIB_INADDRERRORS); | ||
1538 | |||
1528 | IP6_INC_STATS(IPSTATS_MIB_OUTNOROUTES); | 1539 | IP6_INC_STATS(IPSTATS_MIB_OUTNOROUTES); |
1529 | icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_NOROUTE, 0, skb->dev); | 1540 | icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_NOROUTE, 0, skb->dev); |
1530 | kfree_skb(skb); | 1541 | kfree_skb(skb); |