aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_fib.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2007-02-09 09:24:49 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-11 02:19:42 -0500
commit1ab1457c42bc078e5a9becd82a7f9f940b55c53a (patch)
treec25d27c58fb27f4c5930ad120995cc2e3f1e7a4f /net/ipv6/ip6_fib.c
parente905a9edab7f4f14f9213b52234e4a346c690911 (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/ip6_fib.c')
-rw-r--r--net/ipv6/ip6_fib.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 96d8310ae9c8..f90ab5233326 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -1,9 +1,9 @@
1/* 1/*
2 * Linux INET6 implementation 2 * Linux INET6 implementation
3 * Forwarding Information Database 3 * Forwarding Information Database
4 * 4 *
5 * Authors: 5 * Authors:
6 * Pedro Roque <roque@di.fc.ul.pt> 6 * Pedro Roque <roque@di.fc.ul.pt>
7 * 7 *
8 * $Id: ip6_fib.c,v 1.25 2001/10/31 21:55:55 davem Exp $ 8 * $Id: ip6_fib.c,v 1.25 2001/10/31 21:55:55 davem Exp $
9 * 9 *
@@ -97,7 +97,7 @@ static DEFINE_TIMER(ip6_fib_timer, fib6_run_gc, 0, 0);
97 97
98static struct fib6_walker_t fib6_walker_list = { 98static struct fib6_walker_t fib6_walker_list = {
99 .prev = &fib6_walker_list, 99 .prev = &fib6_walker_list,
100 .next = &fib6_walker_list, 100 .next = &fib6_walker_list,
101}; 101};
102 102
103#define FOR_WALKERS(w) for ((w)=fib6_walker_list.next; (w) != &fib6_walker_list; (w)=(w)->next) 103#define FOR_WALKERS(w) for ((w)=fib6_walker_list.next; (w) != &fib6_walker_list; (w)=(w)->next)
@@ -131,7 +131,7 @@ static __inline__ u32 fib6_new_sernum(void)
131/* 131/*
132 * Auxiliary address test functions for the radix tree. 132 * Auxiliary address test functions for the radix tree.
133 * 133 *
134 * These assume a 32bit processor (although it will work on 134 * These assume a 32bit processor (although it will work on
135 * 64bit processors) 135 * 64bit processors)
136 */ 136 */
137 137
@@ -434,7 +434,7 @@ static struct fib6_node * fib6_add_1(struct fib6_node *root, void *addr,
434 struct fib6_node *pn = NULL; 434 struct fib6_node *pn = NULL;
435 struct rt6key *key; 435 struct rt6key *key;
436 int bit; 436 int bit;
437 __be32 dir = 0; 437 __be32 dir = 0;
438 __u32 sernum = fib6_new_sernum(); 438 __u32 sernum = fib6_new_sernum();
439 439
440 RT6_TRACE("fib6_add_1\n"); 440 RT6_TRACE("fib6_add_1\n");
@@ -452,27 +452,27 @@ static struct fib6_node * fib6_add_1(struct fib6_node *root, void *addr,
452 if (plen < fn->fn_bit || 452 if (plen < fn->fn_bit ||
453 !ipv6_prefix_equal(&key->addr, addr, fn->fn_bit)) 453 !ipv6_prefix_equal(&key->addr, addr, fn->fn_bit))
454 goto insert_above; 454 goto insert_above;
455 455
456 /* 456 /*
457 * Exact match ? 457 * Exact match ?
458 */ 458 */
459 459
460 if (plen == fn->fn_bit) { 460 if (plen == fn->fn_bit) {
461 /* clean up an intermediate node */ 461 /* clean up an intermediate node */
462 if ((fn->fn_flags & RTN_RTINFO) == 0) { 462 if ((fn->fn_flags & RTN_RTINFO) == 0) {
463 rt6_release(fn->leaf); 463 rt6_release(fn->leaf);
464 fn->leaf = NULL; 464 fn->leaf = NULL;
465 } 465 }
466 466
467 fn->fn_sernum = sernum; 467 fn->fn_sernum = sernum;
468 468
469 return fn; 469 return fn;
470 } 470 }
471 471
472 /* 472 /*
473 * We have more bits to go 473 * We have more bits to go
474 */ 474 */
475 475
476 /* Try to walk down on tree. */ 476 /* Try to walk down on tree. */
477 fn->fn_sernum = sernum; 477 fn->fn_sernum = sernum;
478 dir = addr_bit_set(addr, fn->fn_bit); 478 dir = addr_bit_set(addr, fn->fn_bit);
@@ -490,7 +490,7 @@ static struct fib6_node * fib6_add_1(struct fib6_node *root, void *addr,
490 if (ln == NULL) 490 if (ln == NULL)
491 return NULL; 491 return NULL;
492 ln->fn_bit = plen; 492 ln->fn_bit = plen;
493 493
494 ln->parent = pn; 494 ln->parent = pn;
495 ln->fn_sernum = sernum; 495 ln->fn_sernum = sernum;
496 496
@@ -504,7 +504,7 @@ static struct fib6_node * fib6_add_1(struct fib6_node *root, void *addr,
504 504
505insert_above: 505insert_above:
506 /* 506 /*
507 * split since we don't have a common prefix anymore or 507 * split since we don't have a common prefix anymore or
508 * we have a less significant route. 508 * we have a less significant route.
509 * we've to insert an intermediate node on the list 509 * we've to insert an intermediate node on the list
510 * this new node will point to the one we need to create 510 * this new node will point to the one we need to create
@@ -518,18 +518,18 @@ insert_above:
518 See comment in __ipv6_addr_diff: bit may be an invalid value, 518 See comment in __ipv6_addr_diff: bit may be an invalid value,
519 but if it is >= plen, the value is ignored in any case. 519 but if it is >= plen, the value is ignored in any case.
520 */ 520 */
521 521
522 bit = __ipv6_addr_diff(addr, &key->addr, addrlen); 522 bit = __ipv6_addr_diff(addr, &key->addr, addrlen);
523 523
524 /* 524 /*
525 * (intermediate)[in] 525 * (intermediate)[in]
526 * / \ 526 * / \
527 * (new leaf node)[ln] (old node)[fn] 527 * (new leaf node)[ln] (old node)[fn]
528 */ 528 */
529 if (plen > bit) { 529 if (plen > bit) {
530 in = node_alloc(); 530 in = node_alloc();
531 ln = node_alloc(); 531 ln = node_alloc();
532 532
533 if (in == NULL || ln == NULL) { 533 if (in == NULL || ln == NULL) {
534 if (in) 534 if (in)
535 node_free(in); 535 node_free(in);
@@ -538,8 +538,8 @@ insert_above:
538 return NULL; 538 return NULL;
539 } 539 }
540 540
541 /* 541 /*
542 * new intermediate node. 542 * new intermediate node.
543 * RTN_RTINFO will 543 * RTN_RTINFO will
544 * be off since that an address that chooses one of 544 * be off since that an address that chooses one of
545 * the branches would not match less specific routes 545 * the branches would not match less specific routes
@@ -576,7 +576,7 @@ insert_above:
576 } 576 }
577 } else { /* plen <= bit */ 577 } else { /* plen <= bit */
578 578
579 /* 579 /*
580 * (new leaf node)[ln] 580 * (new leaf node)[ln]
581 * / \ 581 * / \
582 * (old node)[fn] NULL 582 * (old node)[fn] NULL
@@ -592,7 +592,7 @@ insert_above:
592 ln->parent = pn; 592 ln->parent = pn;
593 593
594 ln->fn_sernum = sernum; 594 ln->fn_sernum = sernum;
595 595
596 if (dir) 596 if (dir)
597 pn->right = ln; 597 pn->right = ln;
598 else 598 else
@@ -1206,7 +1206,7 @@ int fib6_del(struct rt6_info *rt, struct nl_info *info)
1206 * However, it is internally reenterable wrt itself and fib6_add/fib6_del. 1206 * However, it is internally reenterable wrt itself and fib6_add/fib6_del.
1207 * It means, that we can modify tree during walking 1207 * It means, that we can modify tree during walking
1208 * and use this function for garbage collection, clone pruning, 1208 * and use this function for garbage collection, clone pruning,
1209 * cleaning tree when a device goes down etc. etc. 1209 * cleaning tree when a device goes down etc. etc.
1210 * 1210 *
1211 * It guarantees that every node will be traversed, 1211 * It guarantees that every node will be traversed,
1212 * and that it will be traversed only once. 1212 * and that it will be traversed only once.
@@ -1245,7 +1245,7 @@ static int fib6_walk_continue(struct fib6_walker_t *w)
1245 continue; 1245 continue;
1246 } 1246 }
1247 w->state = FWS_L; 1247 w->state = FWS_L;
1248#endif 1248#endif
1249 case FWS_L: 1249 case FWS_L:
1250 if (fn->left) { 1250 if (fn->left) {
1251 w->node = fn->left; 1251 w->node = fn->left;
@@ -1338,7 +1338,7 @@ static int fib6_clean_node(struct fib6_walker_t *w)
1338 1338
1339/* 1339/*
1340 * Convenient frontend to tree walker. 1340 * Convenient frontend to tree walker.
1341 * 1341 *
1342 * func is called on each route. 1342 * func is called on each route.
1343 * It may return -1 -> delete this route. 1343 * It may return -1 -> delete this route.
1344 * 0 -> continue walking 1344 * 0 -> continue walking