aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet/dn_fib.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2007-02-09 09:24:40 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-11 02:19:29 -0500
commit429eb0fae6c06c9adcda03401c09c2b9ccaa7ebd (patch)
tree17e8a73e4e713750413bad4a37cfdc1c78c77d3f /net/decnet/dn_fib.c
parentc9eaf17341834de00351bf79f16b2d879c8aea96 (diff)
[NET] DECNET: 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/decnet/dn_fib.c')
-rw-r--r--net/decnet/dn_fib.c132
1 files changed, 66 insertions, 66 deletions
diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c
index 1cf010124ec5..3cbfddc98430 100644
--- a/net/decnet/dn_fib.c
+++ b/net/decnet/dn_fib.c
@@ -527,7 +527,7 @@ int dn_fib_rtm_newroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
527 return -EINVAL; 527 return -EINVAL;
528 528
529 tb = dn_fib_get_table(rtm_get_table(rta, r->rtm_table), 1); 529 tb = dn_fib_get_table(rtm_get_table(rta, r->rtm_table), 1);
530 if (tb) 530 if (tb)
531 return tb->insert(tb, r, (struct dn_kern_rta *)rta, nlh, &NETLINK_CB(skb)); 531 return tb->insert(tb, r, (struct dn_kern_rta *)rta, nlh, &NETLINK_CB(skb));
532 532
533 return -ENOBUFS; 533 return -ENOBUFS;
@@ -654,80 +654,80 @@ static int dn_fib_dnaddr_event(struct notifier_block *this, unsigned long event,
654 654
655static int dn_fib_sync_down(__le16 local, struct net_device *dev, int force) 655static int dn_fib_sync_down(__le16 local, struct net_device *dev, int force)
656{ 656{
657 int ret = 0; 657 int ret = 0;
658 int scope = RT_SCOPE_NOWHERE; 658 int scope = RT_SCOPE_NOWHERE;
659 659
660 if (force) 660 if (force)
661 scope = -1; 661 scope = -1;
662 662
663 for_fib_info() { 663 for_fib_info() {
664 /* 664 /*
665 * This makes no sense for DECnet.... we will almost 665 * This makes no sense for DECnet.... we will almost
666 * certainly have more than one local address the same 666 * certainly have more than one local address the same
667 * over all our interfaces. It needs thinking about 667 * over all our interfaces. It needs thinking about
668 * some more. 668 * some more.
669 */ 669 */
670 if (local && fi->fib_prefsrc == local) { 670 if (local && fi->fib_prefsrc == local) {
671 fi->fib_flags |= RTNH_F_DEAD; 671 fi->fib_flags |= RTNH_F_DEAD;
672 ret++; 672 ret++;
673 } else if (dev && fi->fib_nhs) { 673 } else if (dev && fi->fib_nhs) {
674 int dead = 0; 674 int dead = 0;
675 675
676 change_nexthops(fi) { 676 change_nexthops(fi) {
677 if (nh->nh_flags&RTNH_F_DEAD) 677 if (nh->nh_flags&RTNH_F_DEAD)
678 dead++; 678 dead++;
679 else if (nh->nh_dev == dev && 679 else if (nh->nh_dev == dev &&
680 nh->nh_scope != scope) { 680 nh->nh_scope != scope) {
681 spin_lock_bh(&dn_fib_multipath_lock); 681 spin_lock_bh(&dn_fib_multipath_lock);
682 nh->nh_flags |= RTNH_F_DEAD; 682 nh->nh_flags |= RTNH_F_DEAD;
683 fi->fib_power -= nh->nh_power; 683 fi->fib_power -= nh->nh_power;
684 nh->nh_power = 0; 684 nh->nh_power = 0;
685 spin_unlock_bh(&dn_fib_multipath_lock); 685 spin_unlock_bh(&dn_fib_multipath_lock);
686 dead++; 686 dead++;
687 } 687 }
688 } endfor_nexthops(fi) 688 } endfor_nexthops(fi)
689 if (dead == fi->fib_nhs) { 689 if (dead == fi->fib_nhs) {
690 fi->fib_flags |= RTNH_F_DEAD; 690 fi->fib_flags |= RTNH_F_DEAD;
691 ret++; 691 ret++;
692 } 692 }
693 } 693 }
694 } endfor_fib_info(); 694 } endfor_fib_info();
695 return ret; 695 return ret;
696} 696}
697 697
698 698
699static int dn_fib_sync_up(struct net_device *dev) 699static int dn_fib_sync_up(struct net_device *dev)
700{ 700{
701 int ret = 0; 701 int ret = 0;
702 702
703 if (!(dev->flags&IFF_UP)) 703 if (!(dev->flags&IFF_UP))
704 return 0; 704 return 0;
705 705
706 for_fib_info() { 706 for_fib_info() {
707 int alive = 0; 707 int alive = 0;
708 708
709 change_nexthops(fi) { 709 change_nexthops(fi) {
710 if (!(nh->nh_flags&RTNH_F_DEAD)) { 710 if (!(nh->nh_flags&RTNH_F_DEAD)) {
711 alive++; 711 alive++;
712 continue; 712 continue;
713 } 713 }
714 if (nh->nh_dev == NULL || !(nh->nh_dev->flags&IFF_UP)) 714 if (nh->nh_dev == NULL || !(nh->nh_dev->flags&IFF_UP))
715 continue; 715 continue;
716 if (nh->nh_dev != dev || dev->dn_ptr == NULL) 716 if (nh->nh_dev != dev || dev->dn_ptr == NULL)
717 continue; 717 continue;
718 alive++; 718 alive++;
719 spin_lock_bh(&dn_fib_multipath_lock); 719 spin_lock_bh(&dn_fib_multipath_lock);
720 nh->nh_power = 0; 720 nh->nh_power = 0;
721 nh->nh_flags &= ~RTNH_F_DEAD; 721 nh->nh_flags &= ~RTNH_F_DEAD;
722 spin_unlock_bh(&dn_fib_multipath_lock); 722 spin_unlock_bh(&dn_fib_multipath_lock);
723 } endfor_nexthops(fi); 723 } endfor_nexthops(fi);
724 724
725 if (alive > 0) { 725 if (alive > 0) {
726 fi->fib_flags &= ~RTNH_F_DEAD; 726 fi->fib_flags &= ~RTNH_F_DEAD;
727 ret++; 727 ret++;
728 } 728 }
729 } endfor_fib_info(); 729 } endfor_fib_info();
730 return ret; 730 return ret;
731} 731}
732 732
733static struct notifier_block dn_fib_dnaddr_notifier = { 733static struct notifier_block dn_fib_dnaddr_notifier = {