diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2007-02-09 09:24:49 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-02-11 02:19:42 -0500 |
commit | 1ab1457c42bc078e5a9becd82a7f9f940b55c53a (patch) | |
tree | c25d27c58fb27f4c5930ad120995cc2e3f1e7a4f /net/ipv6/ndisc.c | |
parent | e905a9edab7f4f14f9213b52234e4a346c690911 (diff) |
[NET] IPV6: Fix whitespace errors.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r-- | net/ipv6/ndisc.c | 138 |
1 files changed, 69 insertions, 69 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 39bb658f3c44..121f31c283f8 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -1,9 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Neighbour Discovery for IPv6 | 2 | * Neighbour Discovery for IPv6 |
3 | * Linux INET6 implementation | 3 | * Linux INET6 implementation |
4 | * | 4 | * |
5 | * Authors: | 5 | * Authors: |
6 | * Pedro Roque <roque@di.fc.ul.pt> | 6 | * Pedro Roque <roque@di.fc.ul.pt> |
7 | * Mike Shaver <shaver@ingenia.com> | 7 | * Mike Shaver <shaver@ingenia.com> |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or | 9 | * This program is free software; you can redistribute it and/or |
@@ -427,25 +427,25 @@ static inline void ndisc_flow_init(struct flowi *fl, u8 type, | |||
427 | 427 | ||
428 | static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh, | 428 | static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh, |
429 | struct in6_addr *daddr, struct in6_addr *solicited_addr, | 429 | struct in6_addr *daddr, struct in6_addr *solicited_addr, |
430 | int router, int solicited, int override, int inc_opt) | 430 | int router, int solicited, int override, int inc_opt) |
431 | { | 431 | { |
432 | struct in6_addr tmpaddr; | 432 | struct in6_addr tmpaddr; |
433 | struct inet6_ifaddr *ifp; | 433 | struct inet6_ifaddr *ifp; |
434 | struct inet6_dev *idev; | 434 | struct inet6_dev *idev; |
435 | struct flowi fl; | 435 | struct flowi fl; |
436 | struct dst_entry* dst; | 436 | struct dst_entry* dst; |
437 | struct sock *sk = ndisc_socket->sk; | 437 | struct sock *sk = ndisc_socket->sk; |
438 | struct in6_addr *src_addr; | 438 | struct in6_addr *src_addr; |
439 | struct nd_msg *msg; | 439 | struct nd_msg *msg; |
440 | int len; | 440 | int len; |
441 | struct sk_buff *skb; | 441 | struct sk_buff *skb; |
442 | int err; | 442 | int err; |
443 | 443 | ||
444 | len = sizeof(struct icmp6hdr) + sizeof(struct in6_addr); | 444 | len = sizeof(struct icmp6hdr) + sizeof(struct in6_addr); |
445 | 445 | ||
446 | /* for anycast or proxy, solicited_addr != src_addr */ | 446 | /* for anycast or proxy, solicited_addr != src_addr */ |
447 | ifp = ipv6_get_ifaddr(solicited_addr, dev, 1); | 447 | ifp = ipv6_get_ifaddr(solicited_addr, dev, 1); |
448 | if (ifp) { | 448 | if (ifp) { |
449 | src_addr = solicited_addr; | 449 | src_addr = solicited_addr; |
450 | in6_ifa_put(ifp); | 450 | in6_ifa_put(ifp); |
451 | } else { | 451 | } else { |
@@ -479,7 +479,7 @@ static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh, | |||
479 | 479 | ||
480 | if (skb == NULL) { | 480 | if (skb == NULL) { |
481 | ND_PRINTK0(KERN_ERR | 481 | ND_PRINTK0(KERN_ERR |
482 | "ICMPv6 NA: %s() failed to allocate an skb.\n", | 482 | "ICMPv6 NA: %s() failed to allocate an skb.\n", |
483 | __FUNCTION__); | 483 | __FUNCTION__); |
484 | dst_release(dst); | 484 | dst_release(dst); |
485 | return; | 485 | return; |
@@ -491,16 +491,16 @@ static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh, | |||
491 | msg = (struct nd_msg *)skb_put(skb, len); | 491 | msg = (struct nd_msg *)skb_put(skb, len); |
492 | skb->h.raw = (unsigned char*)msg; | 492 | skb->h.raw = (unsigned char*)msg; |
493 | 493 | ||
494 | msg->icmph.icmp6_type = NDISC_NEIGHBOUR_ADVERTISEMENT; | 494 | msg->icmph.icmp6_type = NDISC_NEIGHBOUR_ADVERTISEMENT; |
495 | msg->icmph.icmp6_code = 0; | 495 | msg->icmph.icmp6_code = 0; |
496 | msg->icmph.icmp6_cksum = 0; | 496 | msg->icmph.icmp6_cksum = 0; |
497 | 497 | ||
498 | msg->icmph.icmp6_unused = 0; | 498 | msg->icmph.icmp6_unused = 0; |
499 | msg->icmph.icmp6_router = router; | 499 | msg->icmph.icmp6_router = router; |
500 | msg->icmph.icmp6_solicited = solicited; | 500 | msg->icmph.icmp6_solicited = solicited; |
501 | msg->icmph.icmp6_override = override; | 501 | msg->icmph.icmp6_override = override; |
502 | 502 | ||
503 | /* Set the target address. */ | 503 | /* Set the target address. */ |
504 | ipv6_addr_copy(&msg->target, solicited_addr); | 504 | ipv6_addr_copy(&msg->target, solicited_addr); |
505 | 505 | ||
506 | if (inc_opt) | 506 | if (inc_opt) |
@@ -508,9 +508,9 @@ static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh, | |||
508 | dev->addr_len, dev->type); | 508 | dev->addr_len, dev->type); |
509 | 509 | ||
510 | /* checksum */ | 510 | /* checksum */ |
511 | msg->icmph.icmp6_cksum = csum_ipv6_magic(src_addr, daddr, len, | 511 | msg->icmph.icmp6_cksum = csum_ipv6_magic(src_addr, daddr, len, |
512 | IPPROTO_ICMPV6, | 512 | IPPROTO_ICMPV6, |
513 | csum_partial((__u8 *) msg, | 513 | csum_partial((__u8 *) msg, |
514 | len, 0)); | 514 | len, 0)); |
515 | 515 | ||
516 | skb->dst = dst; | 516 | skb->dst = dst; |
@@ -524,20 +524,20 @@ static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh, | |||
524 | 524 | ||
525 | if (likely(idev != NULL)) | 525 | if (likely(idev != NULL)) |
526 | in6_dev_put(idev); | 526 | in6_dev_put(idev); |
527 | } | 527 | } |
528 | 528 | ||
529 | void ndisc_send_ns(struct net_device *dev, struct neighbour *neigh, | 529 | void ndisc_send_ns(struct net_device *dev, struct neighbour *neigh, |
530 | struct in6_addr *solicit, | 530 | struct in6_addr *solicit, |
531 | struct in6_addr *daddr, struct in6_addr *saddr) | 531 | struct in6_addr *daddr, struct in6_addr *saddr) |
532 | { | 532 | { |
533 | struct flowi fl; | 533 | struct flowi fl; |
534 | struct dst_entry* dst; | 534 | struct dst_entry* dst; |
535 | struct inet6_dev *idev; | 535 | struct inet6_dev *idev; |
536 | struct sock *sk = ndisc_socket->sk; | 536 | struct sock *sk = ndisc_socket->sk; |
537 | struct sk_buff *skb; | 537 | struct sk_buff *skb; |
538 | struct nd_msg *msg; | 538 | struct nd_msg *msg; |
539 | struct in6_addr addr_buf; | 539 | struct in6_addr addr_buf; |
540 | int len; | 540 | int len; |
541 | int err; | 541 | int err; |
542 | int send_llinfo; | 542 | int send_llinfo; |
543 | 543 | ||
@@ -569,7 +569,7 @@ void ndisc_send_ns(struct net_device *dev, struct neighbour *neigh, | |||
569 | 1, &err); | 569 | 1, &err); |
570 | if (skb == NULL) { | 570 | if (skb == NULL) { |
571 | ND_PRINTK0(KERN_ERR | 571 | ND_PRINTK0(KERN_ERR |
572 | "ICMPv6 NA: %s() failed to allocate an skb.\n", | 572 | "ICMPv6 NA: %s() failed to allocate an skb.\n", |
573 | __FUNCTION__); | 573 | __FUNCTION__); |
574 | dst_release(dst); | 574 | dst_release(dst); |
575 | return; | 575 | return; |
@@ -594,9 +594,9 @@ void ndisc_send_ns(struct net_device *dev, struct neighbour *neigh, | |||
594 | 594 | ||
595 | /* checksum */ | 595 | /* checksum */ |
596 | msg->icmph.icmp6_cksum = csum_ipv6_magic(&skb->nh.ipv6h->saddr, | 596 | msg->icmph.icmp6_cksum = csum_ipv6_magic(&skb->nh.ipv6h->saddr, |
597 | daddr, len, | 597 | daddr, len, |
598 | IPPROTO_ICMPV6, | 598 | IPPROTO_ICMPV6, |
599 | csum_partial((__u8 *) msg, | 599 | csum_partial((__u8 *) msg, |
600 | len, 0)); | 600 | len, 0)); |
601 | /* send it! */ | 601 | /* send it! */ |
602 | skb->dst = dst; | 602 | skb->dst = dst; |
@@ -619,10 +619,10 @@ void ndisc_send_rs(struct net_device *dev, struct in6_addr *saddr, | |||
619 | struct dst_entry* dst; | 619 | struct dst_entry* dst; |
620 | struct inet6_dev *idev; | 620 | struct inet6_dev *idev; |
621 | struct sock *sk = ndisc_socket->sk; | 621 | struct sock *sk = ndisc_socket->sk; |
622 | struct sk_buff *skb; | 622 | struct sk_buff *skb; |
623 | struct icmp6hdr *hdr; | 623 | struct icmp6hdr *hdr; |
624 | __u8 * opt; | 624 | __u8 * opt; |
625 | int len; | 625 | int len; |
626 | int err; | 626 | int err; |
627 | 627 | ||
628 | ndisc_flow_init(&fl, NDISC_ROUTER_SOLICITATION, saddr, daddr, | 628 | ndisc_flow_init(&fl, NDISC_ROUTER_SOLICITATION, saddr, daddr, |
@@ -640,13 +640,13 @@ void ndisc_send_rs(struct net_device *dev, struct in6_addr *saddr, | |||
640 | if (dev->addr_len) | 640 | if (dev->addr_len) |
641 | len += ndisc_opt_addr_space(dev); | 641 | len += ndisc_opt_addr_space(dev); |
642 | 642 | ||
643 | skb = sock_alloc_send_skb(sk, | 643 | skb = sock_alloc_send_skb(sk, |
644 | (MAX_HEADER + sizeof(struct ipv6hdr) + | 644 | (MAX_HEADER + sizeof(struct ipv6hdr) + |
645 | len + LL_RESERVED_SPACE(dev)), | 645 | len + LL_RESERVED_SPACE(dev)), |
646 | 1, &err); | 646 | 1, &err); |
647 | if (skb == NULL) { | 647 | if (skb == NULL) { |
648 | ND_PRINTK0(KERN_ERR | 648 | ND_PRINTK0(KERN_ERR |
649 | "ICMPv6 RS: %s() failed to allocate an skb.\n", | 649 | "ICMPv6 RS: %s() failed to allocate an skb.\n", |
650 | __FUNCTION__); | 650 | __FUNCTION__); |
651 | dst_release(dst); | 651 | dst_release(dst); |
652 | return; | 652 | return; |
@@ -655,12 +655,12 @@ void ndisc_send_rs(struct net_device *dev, struct in6_addr *saddr, | |||
655 | skb_reserve(skb, LL_RESERVED_SPACE(dev)); | 655 | skb_reserve(skb, LL_RESERVED_SPACE(dev)); |
656 | ip6_nd_hdr(sk, skb, dev, saddr, daddr, IPPROTO_ICMPV6, len); | 656 | ip6_nd_hdr(sk, skb, dev, saddr, daddr, IPPROTO_ICMPV6, len); |
657 | 657 | ||
658 | hdr = (struct icmp6hdr *)skb_put(skb, len); | 658 | hdr = (struct icmp6hdr *)skb_put(skb, len); |
659 | skb->h.raw = (unsigned char*)hdr; | 659 | skb->h.raw = (unsigned char*)hdr; |
660 | hdr->icmp6_type = NDISC_ROUTER_SOLICITATION; | 660 | hdr->icmp6_type = NDISC_ROUTER_SOLICITATION; |
661 | hdr->icmp6_code = 0; | 661 | hdr->icmp6_code = 0; |
662 | hdr->icmp6_cksum = 0; | 662 | hdr->icmp6_cksum = 0; |
663 | hdr->icmp6_unused = 0; | 663 | hdr->icmp6_unused = 0; |
664 | 664 | ||
665 | opt = (u8*) (hdr + 1); | 665 | opt = (u8*) (hdr + 1); |
666 | 666 | ||
@@ -686,7 +686,7 @@ void ndisc_send_rs(struct net_device *dev, struct in6_addr *saddr, | |||
686 | if (likely(idev != NULL)) | 686 | if (likely(idev != NULL)) |
687 | in6_dev_put(idev); | 687 | in6_dev_put(idev); |
688 | } | 688 | } |
689 | 689 | ||
690 | 690 | ||
691 | static void ndisc_error_report(struct neighbour *neigh, struct sk_buff *skb) | 691 | static void ndisc_error_report(struct neighbour *neigh, struct sk_buff *skb) |
692 | { | 692 | { |
@@ -748,7 +748,7 @@ static void ndisc_recv_ns(struct sk_buff *skb) | |||
748 | int is_router; | 748 | int is_router; |
749 | 749 | ||
750 | if (ipv6_addr_is_multicast(&msg->target)) { | 750 | if (ipv6_addr_is_multicast(&msg->target)) { |
751 | ND_PRINTK2(KERN_WARNING | 751 | ND_PRINTK2(KERN_WARNING |
752 | "ICMPv6 NS: multicast target address"); | 752 | "ICMPv6 NS: multicast target address"); |
753 | return; | 753 | return; |
754 | } | 754 | } |
@@ -768,7 +768,7 @@ static void ndisc_recv_ns(struct sk_buff *skb) | |||
768 | } | 768 | } |
769 | 769 | ||
770 | if (!ndisc_parse_options(msg->opt, ndoptlen, &ndopts)) { | 770 | if (!ndisc_parse_options(msg->opt, ndoptlen, &ndopts)) { |
771 | ND_PRINTK2(KERN_WARNING | 771 | ND_PRINTK2(KERN_WARNING |
772 | "ICMPv6 NS: invalid ND options\n"); | 772 | "ICMPv6 NS: invalid ND options\n"); |
773 | return; | 773 | return; |
774 | } | 774 | } |
@@ -782,12 +782,12 @@ static void ndisc_recv_ns(struct sk_buff *skb) | |||
782 | } | 782 | } |
783 | 783 | ||
784 | /* RFC2461 7.1.1: | 784 | /* RFC2461 7.1.1: |
785 | * If the IP source address is the unspecified address, | 785 | * If the IP source address is the unspecified address, |
786 | * there MUST NOT be source link-layer address option | 786 | * there MUST NOT be source link-layer address option |
787 | * in the message. | 787 | * in the message. |
788 | */ | 788 | */ |
789 | if (dad) { | 789 | if (dad) { |
790 | ND_PRINTK2(KERN_WARNING | 790 | ND_PRINTK2(KERN_WARNING |
791 | "ICMPv6 NS: bad DAD packet (link-layer address option)\n"); | 791 | "ICMPv6 NS: bad DAD packet (link-layer address option)\n"); |
792 | return; | 792 | return; |
793 | } | 793 | } |
@@ -816,7 +816,7 @@ static void ndisc_recv_ns(struct sk_buff *skb) | |||
816 | goto out; | 816 | goto out; |
817 | } | 817 | } |
818 | } | 818 | } |
819 | addrconf_dad_failure(ifp); | 819 | addrconf_dad_failure(ifp); |
820 | return; | 820 | return; |
821 | } | 821 | } |
822 | 822 | ||
@@ -829,7 +829,7 @@ static void ndisc_recv_ns(struct sk_buff *skb) | |||
829 | } | 829 | } |
830 | 830 | ||
831 | if (ipv6_chk_acast_addr(dev, &msg->target) || | 831 | if (ipv6_chk_acast_addr(dev, &msg->target) || |
832 | (idev->cnf.forwarding && | 832 | (idev->cnf.forwarding && |
833 | (ipv6_devconf.proxy_ndp || idev->cnf.proxy_ndp) && | 833 | (ipv6_devconf.proxy_ndp || idev->cnf.proxy_ndp) && |
834 | (pneigh = pneigh_lookup(&nd_tbl, | 834 | (pneigh = pneigh_lookup(&nd_tbl, |
835 | &msg->target, dev, 0)) != NULL)) { | 835 | &msg->target, dev, 0)) != NULL)) { |
@@ -839,8 +839,8 @@ static void ndisc_recv_ns(struct sk_buff *skb) | |||
839 | idev->nd_parms->proxy_delay != 0) { | 839 | idev->nd_parms->proxy_delay != 0) { |
840 | /* | 840 | /* |
841 | * for anycast or proxy, | 841 | * for anycast or proxy, |
842 | * sender should delay its response | 842 | * sender should delay its response |
843 | * by a random time between 0 and | 843 | * by a random time between 0 and |
844 | * MAX_ANYCAST_DELAY_TIME seconds. | 844 | * MAX_ANYCAST_DELAY_TIME seconds. |
845 | * (RFC2461) -- yoshfuji | 845 | * (RFC2461) -- yoshfuji |
846 | */ | 846 | */ |
@@ -869,14 +869,14 @@ static void ndisc_recv_ns(struct sk_buff *skb) | |||
869 | else | 869 | else |
870 | NEIGH_CACHE_STAT_INC(&nd_tbl, rcv_probes_ucast); | 870 | NEIGH_CACHE_STAT_INC(&nd_tbl, rcv_probes_ucast); |
871 | 871 | ||
872 | /* | 872 | /* |
873 | * update / create cache entry | 873 | * update / create cache entry |
874 | * for the source address | 874 | * for the source address |
875 | */ | 875 | */ |
876 | neigh = __neigh_lookup(&nd_tbl, saddr, dev, | 876 | neigh = __neigh_lookup(&nd_tbl, saddr, dev, |
877 | !inc || lladdr || !dev->addr_len); | 877 | !inc || lladdr || !dev->addr_len); |
878 | if (neigh) | 878 | if (neigh) |
879 | neigh_update(neigh, lladdr, NUD_STALE, | 879 | neigh_update(neigh, lladdr, NUD_STALE, |
880 | NEIGH_UPDATE_F_WEAK_OVERRIDE| | 880 | NEIGH_UPDATE_F_WEAK_OVERRIDE| |
881 | NEIGH_UPDATE_F_OVERRIDE); | 881 | NEIGH_UPDATE_F_OVERRIDE); |
882 | if (neigh || !dev->hard_header) { | 882 | if (neigh || !dev->hard_header) { |
@@ -926,7 +926,7 @@ static void ndisc_recv_na(struct sk_buff *skb) | |||
926 | "ICMPv6 NA: solicited NA is multicasted.\n"); | 926 | "ICMPv6 NA: solicited NA is multicasted.\n"); |
927 | return; | 927 | return; |
928 | } | 928 | } |
929 | 929 | ||
930 | if (!ndisc_parse_options(msg->opt, ndoptlen, &ndopts)) { | 930 | if (!ndisc_parse_options(msg->opt, ndoptlen, &ndopts)) { |
931 | ND_PRINTK2(KERN_WARNING | 931 | ND_PRINTK2(KERN_WARNING |
932 | "ICMPv6 NS: invalid ND option\n"); | 932 | "ICMPv6 NS: invalid ND option\n"); |
@@ -1057,7 +1057,7 @@ out: | |||
1057 | 1057 | ||
1058 | static void ndisc_router_discovery(struct sk_buff *skb) | 1058 | static void ndisc_router_discovery(struct sk_buff *skb) |
1059 | { | 1059 | { |
1060 | struct ra_msg *ra_msg = (struct ra_msg *) skb->h.raw; | 1060 | struct ra_msg *ra_msg = (struct ra_msg *) skb->h.raw; |
1061 | struct neighbour *neigh = NULL; | 1061 | struct neighbour *neigh = NULL; |
1062 | struct inet6_dev *in6_dev; | 1062 | struct inet6_dev *in6_dev; |
1063 | struct rt6_info *rt = NULL; | 1063 | struct rt6_info *rt = NULL; |
@@ -1076,7 +1076,7 @@ static void ndisc_router_discovery(struct sk_buff *skb) | |||
1076 | return; | 1076 | return; |
1077 | } | 1077 | } |
1078 | if (optlen < 0) { | 1078 | if (optlen < 0) { |
1079 | ND_PRINTK2(KERN_WARNING | 1079 | ND_PRINTK2(KERN_WARNING |
1080 | "ICMPv6 RA: packet too short\n"); | 1080 | "ICMPv6 RA: packet too short\n"); |
1081 | return; | 1081 | return; |
1082 | } | 1082 | } |
@@ -1286,7 +1286,7 @@ skip_defrtr: | |||
1286 | rt6_mtu_change(skb->dev, mtu); | 1286 | rt6_mtu_change(skb->dev, mtu); |
1287 | } | 1287 | } |
1288 | } | 1288 | } |
1289 | 1289 | ||
1290 | if (ndopts.nd_opts_tgt_lladdr || ndopts.nd_opts_rh) { | 1290 | if (ndopts.nd_opts_tgt_lladdr || ndopts.nd_opts_rh) { |
1291 | ND_PRINTK2(KERN_WARNING | 1291 | ND_PRINTK2(KERN_WARNING |
1292 | "ICMPv6 RA: invalid RA options"); | 1292 | "ICMPv6 RA: invalid RA options"); |
@@ -1339,7 +1339,7 @@ static void ndisc_redirect_rcv(struct sk_buff *skb) | |||
1339 | if (ipv6_addr_equal(dest, target)) { | 1339 | if (ipv6_addr_equal(dest, target)) { |
1340 | on_link = 1; | 1340 | on_link = 1; |
1341 | } else if (!(ipv6_addr_type(target) & IPV6_ADDR_LINKLOCAL)) { | 1341 | } else if (!(ipv6_addr_type(target) & IPV6_ADDR_LINKLOCAL)) { |
1342 | ND_PRINTK2(KERN_WARNING | 1342 | ND_PRINTK2(KERN_WARNING |
1343 | "ICMPv6 Redirect: target address is not link-local.\n"); | 1343 | "ICMPv6 Redirect: target address is not link-local.\n"); |
1344 | return; | 1344 | return; |
1345 | } | 1345 | } |
@@ -1352,11 +1352,11 @@ static void ndisc_redirect_rcv(struct sk_buff *skb) | |||
1352 | return; | 1352 | return; |
1353 | } | 1353 | } |
1354 | 1354 | ||
1355 | /* RFC2461 8.1: | 1355 | /* RFC2461 8.1: |
1356 | * The IP source address of the Redirect MUST be the same as the current | 1356 | * The IP source address of the Redirect MUST be the same as the current |
1357 | * first-hop router for the specified ICMP Destination Address. | 1357 | * first-hop router for the specified ICMP Destination Address. |
1358 | */ | 1358 | */ |
1359 | 1359 | ||
1360 | if (!ndisc_parse_options((u8*)(dest + 1), optlen, &ndopts)) { | 1360 | if (!ndisc_parse_options((u8*)(dest + 1), optlen, &ndopts)) { |
1361 | ND_PRINTK2(KERN_WARNING | 1361 | ND_PRINTK2(KERN_WARNING |
1362 | "ICMPv6 Redirect: invalid ND options\n"); | 1362 | "ICMPv6 Redirect: invalid ND options\n"); |
@@ -1410,8 +1410,8 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh, | |||
1410 | ND_PRINTK2(KERN_WARNING | 1410 | ND_PRINTK2(KERN_WARNING |
1411 | "ICMPv6 Redirect: no link-local address on %s\n", | 1411 | "ICMPv6 Redirect: no link-local address on %s\n", |
1412 | dev->name); | 1412 | dev->name); |
1413 | return; | 1413 | return; |
1414 | } | 1414 | } |
1415 | 1415 | ||
1416 | if (!ipv6_addr_equal(&skb->nh.ipv6h->daddr, target) && | 1416 | if (!ipv6_addr_equal(&skb->nh.ipv6h->daddr, target) && |
1417 | !(ipv6_addr_type(target) & IPV6_ADDR_LINKLOCAL)) { | 1417 | !(ipv6_addr_type(target) & IPV6_ADDR_LINKLOCAL)) { |
@@ -1507,7 +1507,7 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh, | |||
1507 | * build redirect option and copy skb over to the new packet. | 1507 | * build redirect option and copy skb over to the new packet. |
1508 | */ | 1508 | */ |
1509 | 1509 | ||
1510 | memset(opt, 0, 8); | 1510 | memset(opt, 0, 8); |
1511 | *(opt++) = ND_OPT_REDIRECT_HDR; | 1511 | *(opt++) = ND_OPT_REDIRECT_HDR; |
1512 | *(opt++) = (rd_len >> 3); | 1512 | *(opt++) = (rd_len >> 3); |
1513 | opt += 6; | 1513 | opt += 6; |
@@ -1556,7 +1556,7 @@ int ndisc_rcv(struct sk_buff *skb) | |||
1556 | } | 1556 | } |
1557 | 1557 | ||
1558 | if (msg->icmph.icmp6_code != 0) { | 1558 | if (msg->icmph.icmp6_code != 0) { |
1559 | ND_PRINTK2(KERN_WARNING | 1559 | ND_PRINTK2(KERN_WARNING |
1560 | "ICMPv6 NDISC: invalid ICMPv6 code: %d\n", | 1560 | "ICMPv6 NDISC: invalid ICMPv6 code: %d\n", |
1561 | msg->icmph.icmp6_code); | 1561 | msg->icmph.icmp6_code); |
1562 | return 0; | 1562 | return 0; |
@@ -1717,12 +1717,12 @@ int __init ndisc_init(struct net_proto_family *ops) | |||
1717 | { | 1717 | { |
1718 | struct ipv6_pinfo *np; | 1718 | struct ipv6_pinfo *np; |
1719 | struct sock *sk; | 1719 | struct sock *sk; |
1720 | int err; | 1720 | int err; |
1721 | 1721 | ||
1722 | err = sock_create_kern(PF_INET6, SOCK_RAW, IPPROTO_ICMPV6, &ndisc_socket); | 1722 | err = sock_create_kern(PF_INET6, SOCK_RAW, IPPROTO_ICMPV6, &ndisc_socket); |
1723 | if (err < 0) { | 1723 | if (err < 0) { |
1724 | ND_PRINTK0(KERN_ERR | 1724 | ND_PRINTK0(KERN_ERR |
1725 | "ICMPv6 NDISC: Failed to initialize the control socket (err %d).\n", | 1725 | "ICMPv6 NDISC: Failed to initialize the control socket (err %d).\n", |
1726 | err); | 1726 | err); |
1727 | ndisc_socket = NULL; /* For safety. */ | 1727 | ndisc_socket = NULL; /* For safety. */ |
1728 | return err; | 1728 | return err; |
@@ -1736,14 +1736,14 @@ int __init ndisc_init(struct net_proto_family *ops) | |||
1736 | np->mc_loop = 0; | 1736 | np->mc_loop = 0; |
1737 | sk->sk_prot->unhash(sk); | 1737 | sk->sk_prot->unhash(sk); |
1738 | 1738 | ||
1739 | /* | 1739 | /* |
1740 | * Initialize the neighbour table | 1740 | * Initialize the neighbour table |
1741 | */ | 1741 | */ |
1742 | 1742 | ||
1743 | neigh_table_init(&nd_tbl); | 1743 | neigh_table_init(&nd_tbl); |
1744 | 1744 | ||
1745 | #ifdef CONFIG_SYSCTL | 1745 | #ifdef CONFIG_SYSCTL |
1746 | neigh_sysctl_register(NULL, &nd_tbl.parms, NET_IPV6, NET_IPV6_NEIGH, | 1746 | neigh_sysctl_register(NULL, &nd_tbl.parms, NET_IPV6, NET_IPV6_NEIGH, |
1747 | "ipv6", | 1747 | "ipv6", |
1748 | &ndisc_ifinfo_sysctl_change, | 1748 | &ndisc_ifinfo_sysctl_change, |
1749 | &ndisc_ifinfo_sysctl_strategy); | 1749 | &ndisc_ifinfo_sysctl_strategy); |