aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-14 23:23:54 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-14 23:23:54 -0400
commit2aec609fb45e84d65bc8eabc7b650bbecb1cc179 (patch)
treeeb3e8a79604113392d0ee74b19dbc1dfce579c11 /net/ipv4
parent4c8894980010536915c4f5513ee180e3614aeca9 (diff)
parent9076689ab07974a6f5d230fc241448f7a77e9078 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: net/netfilter/nf_conntrack_proto_tcp.c
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/fib_trie.c17
-rw-r--r--net/ipv4/netfilter/nf_nat_snmp_basic.c2
-rw-r--r--net/ipv4/tcp_probe.c2
3 files changed, 8 insertions, 13 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index d16ae4623be..f155a66d6eb 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1357,17 +1357,17 @@ static int check_leaf(struct trie *t, struct leaf *l,
1357 t->stats.semantic_match_miss++; 1357 t->stats.semantic_match_miss++;
1358#endif 1358#endif
1359 if (err <= 0) 1359 if (err <= 0)
1360 return plen; 1360 return err;
1361 } 1361 }
1362 1362
1363 return -1; 1363 return 1;
1364} 1364}
1365 1365
1366static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, 1366static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp,
1367 struct fib_result *res) 1367 struct fib_result *res)
1368{ 1368{
1369 struct trie *t = (struct trie *) tb->tb_data; 1369 struct trie *t = (struct trie *) tb->tb_data;
1370 int plen, ret = 0; 1370 int ret;
1371 struct node *n; 1371 struct node *n;
1372 struct tnode *pn; 1372 struct tnode *pn;
1373 int pos, bits; 1373 int pos, bits;
@@ -1391,10 +1391,7 @@ static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp,
1391 1391
1392 /* Just a leaf? */ 1392 /* Just a leaf? */
1393 if (IS_LEAF(n)) { 1393 if (IS_LEAF(n)) {
1394 plen = check_leaf(t, (struct leaf *)n, key, flp, res); 1394 ret = check_leaf(t, (struct leaf *)n, key, flp, res);
1395 if (plen < 0)
1396 goto failed;
1397 ret = 0;
1398 goto found; 1395 goto found;
1399 } 1396 }
1400 1397
@@ -1419,11 +1416,9 @@ static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp,
1419 } 1416 }
1420 1417
1421 if (IS_LEAF(n)) { 1418 if (IS_LEAF(n)) {
1422 plen = check_leaf(t, (struct leaf *)n, key, flp, res); 1419 ret = check_leaf(t, (struct leaf *)n, key, flp, res);
1423 if (plen < 0) 1420 if (ret > 0)
1424 goto backtrace; 1421 goto backtrace;
1425
1426 ret = 0;
1427 goto found; 1422 goto found;
1428 } 1423 }
1429 1424
diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c b/net/ipv4/netfilter/nf_nat_snmp_basic.c
index 7750c97fde7..ffeaffc3fff 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 5ff0ce6e9d3..7ddc30f0744 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