aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ndisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r--net/ipv6/ndisc.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index b3295d82fece..2c74885f8355 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -442,8 +442,9 @@ static void pndisc_destructor(struct pneigh_entry *n)
442 */ 442 */
443static void __ndisc_send(struct net_device *dev, 443static void __ndisc_send(struct net_device *dev,
444 struct neighbour *neigh, 444 struct neighbour *neigh,
445 struct in6_addr *daddr, struct in6_addr *saddr, 445 const struct in6_addr *daddr,
446 struct icmp6hdr *icmp6h, struct in6_addr *target, 446 const struct in6_addr *saddr,
447 struct icmp6hdr *icmp6h, const struct in6_addr *target,
447 int llinfo) 448 int llinfo)
448{ 449{
449 struct flowi fl; 450 struct flowi fl;
@@ -529,12 +530,13 @@ static void __ndisc_send(struct net_device *dev,
529} 530}
530 531
531static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh, 532static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh,
532 struct in6_addr *daddr, struct in6_addr *solicited_addr, 533 const struct in6_addr *daddr,
533 int router, int solicited, int override, int inc_opt) 534 const struct in6_addr *solicited_addr,
535 int router, int solicited, int override, int inc_opt)
534{ 536{
535 struct in6_addr tmpaddr; 537 struct in6_addr tmpaddr;
536 struct inet6_ifaddr *ifp; 538 struct inet6_ifaddr *ifp;
537 struct in6_addr *src_addr; 539 const struct in6_addr *src_addr;
538 struct icmp6hdr icmp6h = { 540 struct icmp6hdr icmp6h = {
539 .icmp6_type = NDISC_NEIGHBOUR_ADVERTISEMENT, 541 .icmp6_type = NDISC_NEIGHBOUR_ADVERTISEMENT,
540 }; 542 };
@@ -564,8 +566,8 @@ static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh,
564} 566}
565 567
566void ndisc_send_ns(struct net_device *dev, struct neighbour *neigh, 568void ndisc_send_ns(struct net_device *dev, struct neighbour *neigh,
567 struct in6_addr *solicit, 569 const struct in6_addr *solicit,
568 struct in6_addr *daddr, struct in6_addr *saddr) 570 const struct in6_addr *daddr, const struct in6_addr *saddr)
569{ 571{
570 struct in6_addr addr_buf; 572 struct in6_addr addr_buf;
571 struct icmp6hdr icmp6h = { 573 struct icmp6hdr icmp6h = {
@@ -584,8 +586,8 @@ void ndisc_send_ns(struct net_device *dev, struct neighbour *neigh,
584 !ipv6_addr_any(saddr) ? ND_OPT_SOURCE_LL_ADDR : 0); 586 !ipv6_addr_any(saddr) ? ND_OPT_SOURCE_LL_ADDR : 0);
585} 587}
586 588
587void ndisc_send_rs(struct net_device *dev, struct in6_addr *saddr, 589void ndisc_send_rs(struct net_device *dev, const struct in6_addr *saddr,
588 struct in6_addr *daddr) 590 const struct in6_addr *daddr)
589{ 591{
590 struct icmp6hdr icmp6h = { 592 struct icmp6hdr icmp6h = {
591 .icmp6_type = NDISC_ROUTER_SOLICITATION, 593 .icmp6_type = NDISC_ROUTER_SOLICITATION,
@@ -816,10 +818,7 @@ static void ndisc_recv_ns(struct sk_buff *skb)
816 is_router = !!idev->cnf.forwarding; 818 is_router = !!idev->cnf.forwarding;
817 819
818 if (dad) { 820 if (dad) {
819 struct in6_addr maddr; 821 ndisc_send_na(dev, NULL, &in6addr_linklocal_allnodes, &msg->target,
820
821 ipv6_addr_all_nodes(&maddr);
822 ndisc_send_na(dev, NULL, &maddr, &msg->target,
823 is_router, 0, (ifp != NULL), 1); 822 is_router, 0, (ifp != NULL), 1);
824 goto out; 823 goto out;
825 } 824 }
@@ -1447,7 +1446,7 @@ static void ndisc_redirect_rcv(struct sk_buff *skb)
1447} 1446}
1448 1447
1449void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh, 1448void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
1450 struct in6_addr *target) 1449 const struct in6_addr *target)
1451{ 1450{
1452 struct net_device *dev = skb->dev; 1451 struct net_device *dev = skb->dev;
1453 struct net *net = dev_net(dev); 1452 struct net *net = dev_net(dev);