diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-10 20:58:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-10 20:58:47 -0400 |
commit | e5a5816f7875207cb0a0a7032e39a4686c5e10a4 (patch) | |
tree | 6c80171401f4cd38685e19d2f36ac54560720d5f /net/ipv4 | |
parent | bdb21928512a860a60e6a24a849dc5b63cbaf96a (diff) | |
parent | e35259a95331ae4a9146cc03ab49aad641cab957 (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: (27 commits)
tun: Persistent devices can get stuck in xoff state
xfrm: Add a XFRM_STATE_AF_UNSPEC flag to xfrm_usersa_info
ipv6: missed namespace context in ipv6_rthdr_rcv
netlabel: netlink_unicast calls kfree_skb on error path by itself
ipv4: fib_trie: Fix lookup error return
tcp: correct kcalloc usage
ip: sysctl documentation cleanup
Documentation: clarify tcp_{r,w}mem sysctl docs
netfilter: nf_nat_snmp_basic: fix a range check in NAT for SNMP
netfilter: nf_conntrack_tcp: fix endless loop
libertas: fix memory alignment problems on the blackfin
zd1211rw: stop beacons on remove_interface
rt2x00: Disable synchronization during initialization
rc80211_pid: Fix fast_start parameter handling
sctp: Add documentation for sctp sysctl variable
ipv6: fix race between ipv6_del_addr and DAD timer
irda: Fix netlink error path return value
irda: New device ID for nsc-ircc
irda: via-ircc proper dma freeing
sctp: Mark the tsn as received after all allocations finish
...
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/fib_trie.c | 17 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_nat_snmp_basic.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_probe.c | 2 |
3 files changed, 8 insertions, 13 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 4b02d14e7ab9..e1600ad8fb0e 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -1359,17 +1359,17 @@ static int check_leaf(struct trie *t, struct leaf *l, | |||
1359 | t->stats.semantic_match_miss++; | 1359 | t->stats.semantic_match_miss++; |
1360 | #endif | 1360 | #endif |
1361 | if (err <= 0) | 1361 | if (err <= 0) |
1362 | return plen; | 1362 | return err; |
1363 | } | 1363 | } |
1364 | 1364 | ||
1365 | return -1; | 1365 | return 1; |
1366 | } | 1366 | } |
1367 | 1367 | ||
1368 | static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, | 1368 | static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, |
1369 | struct fib_result *res) | 1369 | struct fib_result *res) |
1370 | { | 1370 | { |
1371 | struct trie *t = (struct trie *) tb->tb_data; | 1371 | struct trie *t = (struct trie *) tb->tb_data; |
1372 | int plen, ret = 0; | 1372 | int ret; |
1373 | struct node *n; | 1373 | struct node *n; |
1374 | struct tnode *pn; | 1374 | struct tnode *pn; |
1375 | int pos, bits; | 1375 | int pos, bits; |
@@ -1393,10 +1393,7 @@ static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, | |||
1393 | 1393 | ||
1394 | /* Just a leaf? */ | 1394 | /* Just a leaf? */ |
1395 | if (IS_LEAF(n)) { | 1395 | if (IS_LEAF(n)) { |
1396 | plen = check_leaf(t, (struct leaf *)n, key, flp, res); | 1396 | ret = check_leaf(t, (struct leaf *)n, key, flp, res); |
1397 | if (plen < 0) | ||
1398 | goto failed; | ||
1399 | ret = 0; | ||
1400 | goto found; | 1397 | goto found; |
1401 | } | 1398 | } |
1402 | 1399 | ||
@@ -1421,11 +1418,9 @@ static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, | |||
1421 | } | 1418 | } |
1422 | 1419 | ||
1423 | if (IS_LEAF(n)) { | 1420 | if (IS_LEAF(n)) { |
1424 | plen = check_leaf(t, (struct leaf *)n, key, flp, res); | 1421 | ret = check_leaf(t, (struct leaf *)n, key, flp, res); |
1425 | if (plen < 0) | 1422 | if (ret > 0) |
1426 | goto backtrace; | 1423 | goto backtrace; |
1427 | |||
1428 | ret = 0; | ||
1429 | goto found; | 1424 | goto found; |
1430 | } | 1425 | } |
1431 | 1426 | ||
diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c b/net/ipv4/netfilter/nf_nat_snmp_basic.c index 7750c97fde7b..ffeaffc3fffe 100644 --- a/net/ipv4/netfilter/nf_nat_snmp_basic.c +++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c | |||
@@ -439,8 +439,8 @@ static unsigned char asn1_oid_decode(struct asn1_ctx *ctx, | |||
439 | unsigned int *len) | 439 | unsigned int *len) |
440 | { | 440 | { |
441 | unsigned long subid; | 441 | unsigned long subid; |
442 | unsigned int size; | ||
443 | unsigned long *optr; | 442 | unsigned long *optr; |
443 | size_t size; | ||
444 | 444 | ||
445 | size = eoc - ctx->pointer + 1; | 445 | size = eoc - ctx->pointer + 1; |
446 | 446 | ||
diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c index 5ff0ce6e9d39..7ddc30f0744f 100644 --- a/net/ipv4/tcp_probe.c +++ b/net/ipv4/tcp_probe.c | |||
@@ -224,7 +224,7 @@ static __init int tcpprobe_init(void) | |||
224 | if (bufsize < 0) | 224 | if (bufsize < 0) |
225 | return -EINVAL; | 225 | return -EINVAL; |
226 | 226 | ||
227 | tcp_probe.log = kcalloc(sizeof(struct tcp_log), bufsize, GFP_KERNEL); | 227 | tcp_probe.log = kcalloc(bufsize, sizeof(struct tcp_log), GFP_KERNEL); |
228 | if (!tcp_probe.log) | 228 | if (!tcp_probe.log) |
229 | goto err0; | 229 | goto err0; |
230 | 230 | ||