Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215456
b: refs/heads/master
c: 8b008fa
h: refs/heads/master
v: v3
  • Loading branch information
Pablo Neira Ayuso authored and Patrick McHardy committed Sep 22, 2010
1 parent b604efa commit 3aae878
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 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: bcac0dfab191cb53b3f9b43c8014a34070ed58ff
refs/heads/master: 8b008faf92ac8f7eeb65e8cd36077601af7c46db
4 changes: 4 additions & 0 deletions trunk/include/linux/netfilter/nf_conntrack_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ enum ip_conntrack_expect_events {
IPEXP_NEW, /* new expectation */
};

/* expectation flags */
#define NF_CT_EXPECT_PERMANENT 0x1
#define NF_CT_EXPECT_INACTIVE 0x2

#ifdef __KERNEL__
struct ip_conntrack_stat {
unsigned int searched;
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/netfilter/nfnetlink_conntrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ enum ctattr_expect {
CTA_EXPECT_ID,
CTA_EXPECT_HELP_NAME,
CTA_EXPECT_ZONE,
CTA_EXPECT_FLAGS,
__CTA_EXPECT_MAX
};
#define CTA_EXPECT_MAX (__CTA_EXPECT_MAX - 1)
Expand Down
3 changes: 0 additions & 3 deletions trunk/include/net/netfilter/nf_conntrack_expect.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ struct nf_conntrack_expect_policy {

#define NF_CT_EXPECT_CLASS_DEFAULT 0

#define NF_CT_EXPECT_PERMANENT 0x1
#define NF_CT_EXPECT_INACTIVE 0x2

int nf_conntrack_expect_init(struct net *net);
void nf_conntrack_expect_fini(struct net *net);

Expand Down
8 changes: 7 additions & 1 deletion trunk/net/netfilter/nf_conntrack_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1577,6 +1577,7 @@ ctnetlink_exp_dump_expect(struct sk_buff *skb,

NLA_PUT_BE32(skb, CTA_EXPECT_TIMEOUT, htonl(timeout));
NLA_PUT_BE32(skb, CTA_EXPECT_ID, htonl((unsigned long)exp));
NLA_PUT_BE32(skb, CTA_EXPECT_FLAGS, htonl(exp->flags));
helper = rcu_dereference(nfct_help(master)->helper);
if (helper)
NLA_PUT_STRING(skb, CTA_EXPECT_HELP_NAME, helper->name);
Expand Down Expand Up @@ -1734,6 +1735,7 @@ static const struct nla_policy exp_nla_policy[CTA_EXPECT_MAX+1] = {
[CTA_EXPECT_ID] = { .type = NLA_U32 },
[CTA_EXPECT_HELP_NAME] = { .type = NLA_NUL_STRING },
[CTA_EXPECT_ZONE] = { .type = NLA_U16 },
[CTA_EXPECT_FLAGS] = { .type = NLA_U32 },
};

static int
Expand Down Expand Up @@ -1933,9 +1935,13 @@ ctnetlink_create_expect(struct net *net, u16 zone,
goto out;
}

if (cda[CTA_EXPECT_FLAGS])
exp->flags = ntohl(nla_get_be32(cda[CTA_EXPECT_FLAGS]));
else
exp->flags = 0;

exp->class = 0;
exp->expectfn = NULL;
exp->flags = 0;
exp->master = ct;
exp->helper = NULL;
memcpy(&exp->tuple, &tuple, sizeof(struct nf_conntrack_tuple));
Expand Down

0 comments on commit 3aae878

Please sign in to comment.