diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-24 11:40:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-24 11:40:34 -0400 |
commit | d02aacff4467806ee56f147ac8eff6911d95811a (patch) | |
tree | 3bc6197f735f18dd4c3cd7c77f2a45bb9b8fac16 /net/ipv4/fib_hash.c | |
parent | e270b51df657011983241ec61a1fc7de186e16cd (diff) | |
parent | 9edb74cc6ccb3a893c3d40727b7003c3c16f85a0 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (22 commits)
tun: Multicast handling in tun_chr_ioctl() needs proper locking.
[NET]: Fix heavy stack usage in seq_file output routines.
[AF_UNIX] Initialise UNIX sockets before general device initcalls
[RTNETLINK]: Fix bogus ASSERT_RTNL warning
iwlwifi: Fix built-in compilation of iwlcore (part 2)
tun: Fix minor race in TUNSETLINK ioctl handling.
ppp_generic: use stats from net_device structure
iwlwifi: Don't unlock priv->mutex if it isn't locked
wireless: rndis_wlan: modparam_workaround_interval is never below 0.
prism54: prism54_get_encode() test below 0 on unsigned index
mac80211: update mesh EID values
b43: Workaround DMA quirks
mac80211: fix use before check of Qdisc length
net/mac80211/rx.c: fix off-by-one
mac80211: Fix race between ieee80211_rx_bss_put and lookup routines.
ath5k: Fix radio identification on AR5424/2424
ssb: Fix all-ones boardflags
b43: Add more btcoexist workarounds
b43: Fix HostFlags data types
b43: Workaround invalid bluetooth settings
...
Diffstat (limited to 'net/ipv4/fib_hash.c')
-rw-r--r-- | net/ipv4/fib_hash.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c index 02088deb0461..2e2fc3376ac9 100644 --- a/net/ipv4/fib_hash.c +++ b/net/ipv4/fib_hash.c | |||
@@ -1003,7 +1003,7 @@ static unsigned fib_flag_trans(int type, __be32 mask, struct fib_info *fi) | |||
1003 | static int fib_seq_show(struct seq_file *seq, void *v) | 1003 | static int fib_seq_show(struct seq_file *seq, void *v) |
1004 | { | 1004 | { |
1005 | struct fib_iter_state *iter; | 1005 | struct fib_iter_state *iter; |
1006 | char bf[128]; | 1006 | int len; |
1007 | __be32 prefix, mask; | 1007 | __be32 prefix, mask; |
1008 | unsigned flags; | 1008 | unsigned flags; |
1009 | struct fib_node *f; | 1009 | struct fib_node *f; |
@@ -1025,18 +1025,19 @@ static int fib_seq_show(struct seq_file *seq, void *v) | |||
1025 | mask = FZ_MASK(iter->zone); | 1025 | mask = FZ_MASK(iter->zone); |
1026 | flags = fib_flag_trans(fa->fa_type, mask, fi); | 1026 | flags = fib_flag_trans(fa->fa_type, mask, fi); |
1027 | if (fi) | 1027 | if (fi) |
1028 | snprintf(bf, sizeof(bf), | 1028 | seq_printf(seq, |
1029 | "%s\t%08X\t%08X\t%04X\t%d\t%u\t%d\t%08X\t%d\t%u\t%u", | 1029 | "%s\t%08X\t%08X\t%04X\t%d\t%u\t%d\t%08X\t%d\t%u\t%u%n", |
1030 | fi->fib_dev ? fi->fib_dev->name : "*", prefix, | 1030 | fi->fib_dev ? fi->fib_dev->name : "*", prefix, |
1031 | fi->fib_nh->nh_gw, flags, 0, 0, fi->fib_priority, | 1031 | fi->fib_nh->nh_gw, flags, 0, 0, fi->fib_priority, |
1032 | mask, (fi->fib_advmss ? fi->fib_advmss + 40 : 0), | 1032 | mask, (fi->fib_advmss ? fi->fib_advmss + 40 : 0), |
1033 | fi->fib_window, | 1033 | fi->fib_window, |
1034 | fi->fib_rtt >> 3); | 1034 | fi->fib_rtt >> 3, &len); |
1035 | else | 1035 | else |
1036 | snprintf(bf, sizeof(bf), | 1036 | seq_printf(seq, |
1037 | "*\t%08X\t%08X\t%04X\t%d\t%u\t%d\t%08X\t%d\t%u\t%u", | 1037 | "*\t%08X\t%08X\t%04X\t%d\t%u\t%d\t%08X\t%d\t%u\t%u%n", |
1038 | prefix, 0, flags, 0, 0, 0, mask, 0, 0, 0); | 1038 | prefix, 0, flags, 0, 0, 0, mask, 0, 0, 0, &len); |
1039 | seq_printf(seq, "%-127s\n", bf); | 1039 | |
1040 | seq_printf(seq, "%*s\n", 127 - len, ""); | ||
1040 | out: | 1041 | out: |
1041 | return 0; | 1042 | return 0; |
1042 | } | 1043 | } |