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.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index d2d44dc22f19..7ea5a502ca08 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -431,7 +431,7 @@ static void __ndisc_send(struct net_device *dev,
431 struct neighbour *neigh, 431 struct neighbour *neigh,
432 struct in6_addr *daddr, struct in6_addr *saddr, 432 struct in6_addr *daddr, struct in6_addr *saddr,
433 struct icmp6hdr *icmp6h, struct in6_addr *target, 433 struct icmp6hdr *icmp6h, struct in6_addr *target,
434 int llinfo, int icmp6_mib_outnd) 434 int llinfo)
435{ 435{
436 struct flowi fl; 436 struct flowi fl;
437 struct dst_entry *dst; 437 struct dst_entry *dst;
@@ -441,9 +441,11 @@ static void __ndisc_send(struct net_device *dev,
441 struct inet6_dev *idev; 441 struct inet6_dev *idev;
442 int len; 442 int len;
443 int err; 443 int err;
444 u8 *opt; 444 u8 *opt, type;
445
446 type = icmp6h->icmp6_type;
445 447
446 ndisc_flow_init(&fl, icmp6h->icmp6_type, saddr, daddr, 448 ndisc_flow_init(&fl, type, saddr, daddr,
447 dev->ifindex); 449 dev->ifindex);
448 450
449 dst = ndisc_dst_alloc(dev, neigh, daddr, ip6_output); 451 dst = ndisc_dst_alloc(dev, neigh, daddr, ip6_output);
@@ -504,7 +506,7 @@ static void __ndisc_send(struct net_device *dev,
504 506
505 err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, dst->dev, dst_output); 507 err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, dst->dev, dst_output);
506 if (!err) { 508 if (!err) {
507 ICMP6_INC_STATS(idev, icmp6_mib_outnd); 509 ICMP6MSGOUT_INC_STATS(idev, type);
508 ICMP6_INC_STATS(idev, ICMP6_MIB_OUTMSGS); 510 ICMP6_INC_STATS(idev, ICMP6_MIB_OUTMSGS);
509 } 511 }
510 512
@@ -542,8 +544,7 @@ static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh,
542 544
543 __ndisc_send(dev, neigh, daddr, src_addr, 545 __ndisc_send(dev, neigh, daddr, src_addr,
544 &icmp6h, solicited_addr, 546 &icmp6h, solicited_addr,
545 inc_opt ? ND_OPT_TARGET_LL_ADDR : 0, 547 inc_opt ? ND_OPT_TARGET_LL_ADDR : 0);
546 ICMP6_MIB_OUTNEIGHBORADVERTISEMENTS);
547} 548}
548 549
549void ndisc_send_ns(struct net_device *dev, struct neighbour *neigh, 550void ndisc_send_ns(struct net_device *dev, struct neighbour *neigh,
@@ -564,8 +565,7 @@ void ndisc_send_ns(struct net_device *dev, struct neighbour *neigh,
564 565
565 __ndisc_send(dev, neigh, daddr, saddr, 566 __ndisc_send(dev, neigh, daddr, saddr,
566 &icmp6h, solicit, 567 &icmp6h, solicit,
567 !ipv6_addr_any(saddr) ? ND_OPT_SOURCE_LL_ADDR : 0, 568 !ipv6_addr_any(saddr) ? ND_OPT_SOURCE_LL_ADDR : 0);
568 ICMP6_MIB_OUTNEIGHBORSOLICITS);
569} 569}
570 570
571void ndisc_send_rs(struct net_device *dev, struct in6_addr *saddr, 571void ndisc_send_rs(struct net_device *dev, struct in6_addr *saddr,
@@ -599,8 +599,7 @@ void ndisc_send_rs(struct net_device *dev, struct in6_addr *saddr,
599#endif 599#endif
600 __ndisc_send(dev, NULL, daddr, saddr, 600 __ndisc_send(dev, NULL, daddr, saddr,
601 &icmp6h, NULL, 601 &icmp6h, NULL,
602 send_sllao ? ND_OPT_SOURCE_LL_ADDR : 0, 602 send_sllao ? ND_OPT_SOURCE_LL_ADDR : 0);
603 ICMP6_MIB_OUTROUTERSOLICITS);
604} 603}
605 604
606 605
@@ -1455,7 +1454,7 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
1455 IP6_INC_STATS(idev, IPSTATS_MIB_OUTREQUESTS); 1454 IP6_INC_STATS(idev, IPSTATS_MIB_OUTREQUESTS);
1456 err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, buff, NULL, dst->dev, dst_output); 1455 err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, buff, NULL, dst->dev, dst_output);
1457 if (!err) { 1456 if (!err) {
1458 ICMP6_INC_STATS(idev, ICMP6_MIB_OUTREDIRECTS); 1457 ICMP6MSGOUT_INC_STATS(idev, NDISC_REDIRECT);
1459 ICMP6_INC_STATS(idev, ICMP6_MIB_OUTMSGS); 1458 ICMP6_INC_STATS(idev, ICMP6_MIB_OUTMSGS);
1460 } 1459 }
1461 1460