Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79507
b: refs/heads/master
c: 1328042
h: refs/heads/master
i:
  79505: 3bd1600
  79503: ca9f647
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Jan 28, 2008
1 parent e3ecc9c commit 3c7b57b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 936722922f6d2366378de606a40c14f96915474d
refs/heads/master: 1328042e268c936189f15eba5bd9a5a4605a8581
49 changes: 24 additions & 25 deletions trunk/net/ipv4/fib_trie.c
Original file line number Diff line number Diff line change
Expand Up @@ -2399,31 +2399,30 @@ static int fib_trie_seq_show(struct seq_file *seq, void *v)

} else {
struct leaf *l = (struct leaf *) n;
int i;
struct leaf_info *li;
struct hlist_node *node;

__be32 val = htonl(l->key);

seq_indent(seq, iter->depth);
seq_printf(seq, " |-- %d.%d.%d.%d\n", NIPQUAD(val));
for (i = 32; i >= 0; i--) {
struct leaf_info *li = find_leaf_info(l, i);

if (li) {
struct fib_alias *fa;

list_for_each_entry_rcu(fa, &li->falh, fa_list) {
char buf1[32], buf2[32];

seq_indent(seq, iter->depth+1);
seq_printf(seq, " /%d %s %s", i,
rtn_scope(buf1, sizeof(buf1),
fa->fa_scope),
rtn_type(buf2, sizeof(buf2),
fa->fa_type));
if (fa->fa_tos)
seq_printf(seq, "tos =%d\n",
fa->fa_tos);
seq_putc(seq, '\n');
}

hlist_for_each_entry_rcu(li, node, &l->list, hlist) {
struct fib_alias *fa;

list_for_each_entry_rcu(fa, &li->falh, fa_list) {
char buf1[32], buf2[32];

seq_indent(seq, iter->depth+1);
seq_printf(seq, " /%d %s %s", li->plen,
rtn_scope(buf1, sizeof(buf1),
fa->fa_scope),
rtn_type(buf2, sizeof(buf2),
fa->fa_type));
if (fa->fa_tos)
seq_printf(seq, "tos =%d\n",
fa->fa_tos);
seq_putc(seq, '\n');
}
}
}
Expand Down Expand Up @@ -2477,8 +2476,8 @@ static int fib_route_seq_show(struct seq_file *seq, void *v)
{
const struct fib_trie_iter *iter = seq->private;
struct leaf *l = v;
int i;
char bf[128];
struct leaf_info *li;
struct hlist_node *node;

if (v == SEQ_START_TOKEN) {
seq_printf(seq, "%-127s\n", "Iface\tDestination\tGateway "
Expand All @@ -2493,8 +2492,7 @@ static int fib_route_seq_show(struct seq_file *seq, void *v)
if (IS_TNODE(l))
return 0;

for (i = 32; i >= 0; i--) {
struct leaf_info *li = find_leaf_info(l, i);
hlist_for_each_entry_rcu(li, node, &l->list, hlist) {
struct fib_alias *fa;
__be32 mask, prefix;

Expand All @@ -2507,6 +2505,7 @@ static int fib_route_seq_show(struct seq_file *seq, void *v)
list_for_each_entry_rcu(fa, &li->falh, fa_list) {
const struct fib_info *fi = fa->fa_info;
unsigned flags = fib_flag_trans(fa->fa_type, mask, fi);
char bf[128];

if (fa->fa_type == RTN_BROADCAST
|| fa->fa_type == RTN_MULTICAST)
Expand Down

0 comments on commit 3c7b57b

Please sign in to comment.