aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv6/ndisc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 6a9f616de37d..39bb658f3c44 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -1413,6 +1413,13 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
1413 return; 1413 return;
1414 } 1414 }
1415 1415
1416 if (!ipv6_addr_equal(&skb->nh.ipv6h->daddr, target) &&
1417 !(ipv6_addr_type(target) & IPV6_ADDR_LINKLOCAL)) {
1418 ND_PRINTK2(KERN_WARNING
1419 "ICMPv6 Redirect: target address is not link-local.\n");
1420 return;
1421 }
1422
1416 ndisc_flow_init(&fl, NDISC_REDIRECT, &saddr_buf, &skb->nh.ipv6h->saddr, 1423 ndisc_flow_init(&fl, NDISC_REDIRECT, &saddr_buf, &skb->nh.ipv6h->saddr,
1417 dev->ifindex); 1424 dev->ifindex);
1418 1425