diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nf_conntrack_expect.c | 6 | ||||
-rw-r--r-- | net/netfilter/nft_ct.c | 1 | ||||
-rw-r--r-- | net/netfilter/nft_set_bitmap.c | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c index e19a69787d99..4b2e1fb28bb4 100644 --- a/net/netfilter/nf_conntrack_expect.c +++ b/net/netfilter/nf_conntrack_expect.c | |||
@@ -410,7 +410,7 @@ static inline int __nf_ct_expect_check(struct nf_conntrack_expect *expect) | |||
410 | struct net *net = nf_ct_exp_net(expect); | 410 | struct net *net = nf_ct_exp_net(expect); |
411 | struct hlist_node *next; | 411 | struct hlist_node *next; |
412 | unsigned int h; | 412 | unsigned int h; |
413 | int ret = 1; | 413 | int ret = 0; |
414 | 414 | ||
415 | if (!master_help) { | 415 | if (!master_help) { |
416 | ret = -ESHUTDOWN; | 416 | ret = -ESHUTDOWN; |
@@ -460,14 +460,14 @@ int nf_ct_expect_related_report(struct nf_conntrack_expect *expect, | |||
460 | 460 | ||
461 | spin_lock_bh(&nf_conntrack_expect_lock); | 461 | spin_lock_bh(&nf_conntrack_expect_lock); |
462 | ret = __nf_ct_expect_check(expect); | 462 | ret = __nf_ct_expect_check(expect); |
463 | if (ret <= 0) | 463 | if (ret < 0) |
464 | goto out; | 464 | goto out; |
465 | 465 | ||
466 | nf_ct_expect_insert(expect); | 466 | nf_ct_expect_insert(expect); |
467 | 467 | ||
468 | spin_unlock_bh(&nf_conntrack_expect_lock); | 468 | spin_unlock_bh(&nf_conntrack_expect_lock); |
469 | nf_ct_expect_event_report(IPEXP_NEW, expect, portid, report); | 469 | nf_ct_expect_event_report(IPEXP_NEW, expect, portid, report); |
470 | return ret; | 470 | return 0; |
471 | out: | 471 | out: |
472 | spin_unlock_bh(&nf_conntrack_expect_lock); | 472 | spin_unlock_bh(&nf_conntrack_expect_lock); |
473 | return ret; | 473 | return ret; |
diff --git a/net/netfilter/nft_ct.c b/net/netfilter/nft_ct.c index c6b8022c0e47..bf548a7a71ec 100644 --- a/net/netfilter/nft_ct.c +++ b/net/netfilter/nft_ct.c | |||
@@ -528,6 +528,7 @@ static int nft_ct_set_init(const struct nft_ctx *ctx, | |||
528 | if (!nft_ct_tmpl_alloc_pcpu()) | 528 | if (!nft_ct_tmpl_alloc_pcpu()) |
529 | return -ENOMEM; | 529 | return -ENOMEM; |
530 | nft_ct_pcpu_template_refcnt++; | 530 | nft_ct_pcpu_template_refcnt++; |
531 | len = sizeof(u16); | ||
531 | break; | 532 | break; |
532 | #endif | 533 | #endif |
533 | default: | 534 | default: |
diff --git a/net/netfilter/nft_set_bitmap.c b/net/netfilter/nft_set_bitmap.c index 97f9649bcc7e..152d226552c1 100644 --- a/net/netfilter/nft_set_bitmap.c +++ b/net/netfilter/nft_set_bitmap.c | |||
@@ -258,7 +258,7 @@ static int nft_bitmap_init(const struct nft_set *set, | |||
258 | { | 258 | { |
259 | struct nft_bitmap *priv = nft_set_priv(set); | 259 | struct nft_bitmap *priv = nft_set_priv(set); |
260 | 260 | ||
261 | priv->bitmap_size = nft_bitmap_total_size(set->klen); | 261 | priv->bitmap_size = nft_bitmap_size(set->klen); |
262 | 262 | ||
263 | return 0; | 263 | return 0; |
264 | } | 264 | } |