diff options
author | Patrick McHardy <kaber@trash.net> | 2006-12-03 01:08:01 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-12-03 01:08:01 -0500 |
commit | d6a9b6500a8941599bcef98e7de49e1260d104ed (patch) | |
tree | 10dd941f8b67d885665b469bf9c476c0a8cbeebc /include | |
parent | 55a733247d6d2883d9bb77825fafac3dfca13fc2 (diff) |
[NETFILTER]: nf_conntrack: add helper function for expectation initialization
Expectation address masks need to be differently initialized depending
on the address family, create helper function to avoid cluttering up
the code too much.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/netfilter/nf_conntrack_expect.h | 4 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_tuple.h | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/include/net/netfilter/nf_conntrack_expect.h b/include/net/netfilter/nf_conntrack_expect.h index b969c430b36a..54a3d038beaa 100644 --- a/include/net/netfilter/nf_conntrack_expect.h +++ b/include/net/netfilter/nf_conntrack_expect.h | |||
@@ -68,6 +68,10 @@ void nf_conntrack_unexpect_related(struct nf_conntrack_expect *exp); | |||
68 | /* Allocate space for an expectation: this is mandatory before calling | 68 | /* Allocate space for an expectation: this is mandatory before calling |
69 | nf_conntrack_expect_related. You will have to call put afterwards. */ | 69 | nf_conntrack_expect_related. You will have to call put afterwards. */ |
70 | struct nf_conntrack_expect *nf_conntrack_expect_alloc(struct nf_conn *me); | 70 | struct nf_conntrack_expect *nf_conntrack_expect_alloc(struct nf_conn *me); |
71 | void nf_conntrack_expect_init(struct nf_conntrack_expect *, int, | ||
72 | union nf_conntrack_address *, | ||
73 | union nf_conntrack_address *, | ||
74 | u_int8_t, __be16 *, __be16 *); | ||
71 | void nf_conntrack_expect_put(struct nf_conntrack_expect *exp); | 75 | void nf_conntrack_expect_put(struct nf_conntrack_expect *exp); |
72 | int nf_conntrack_expect_related(struct nf_conntrack_expect *expect); | 76 | int nf_conntrack_expect_related(struct nf_conntrack_expect *expect); |
73 | 77 | ||
diff --git a/include/net/netfilter/nf_conntrack_tuple.h b/include/net/netfilter/nf_conntrack_tuple.h index be9dc9a0eb77..c96a9c576736 100644 --- a/include/net/netfilter/nf_conntrack_tuple.h +++ b/include/net/netfilter/nf_conntrack_tuple.h | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | /* The l3 protocol-specific manipulable parts of the tuple: always in | 25 | /* The l3 protocol-specific manipulable parts of the tuple: always in |
26 | network order! */ | 26 | network order! */ |
27 | union nf_conntrack_man_l3proto { | 27 | union nf_conntrack_address { |
28 | u_int32_t all[NF_CT_TUPLE_L3SIZE]; | 28 | u_int32_t all[NF_CT_TUPLE_L3SIZE]; |
29 | __be32 ip; | 29 | __be32 ip; |
30 | __be32 ip6[4]; | 30 | __be32 ip6[4]; |
@@ -54,7 +54,7 @@ union nf_conntrack_man_proto | |||
54 | /* The manipulable part of the tuple. */ | 54 | /* The manipulable part of the tuple. */ |
55 | struct nf_conntrack_man | 55 | struct nf_conntrack_man |
56 | { | 56 | { |
57 | union nf_conntrack_man_l3proto u3; | 57 | union nf_conntrack_address u3; |
58 | union nf_conntrack_man_proto u; | 58 | union nf_conntrack_man_proto u; |
59 | /* Layer 3 protocol */ | 59 | /* Layer 3 protocol */ |
60 | u_int16_t l3num; | 60 | u_int16_t l3num; |
@@ -67,11 +67,7 @@ struct nf_conntrack_tuple | |||
67 | 67 | ||
68 | /* These are the parts of the tuple which are fixed. */ | 68 | /* These are the parts of the tuple which are fixed. */ |
69 | struct { | 69 | struct { |
70 | union { | 70 | union nf_conntrack_address u3; |
71 | u_int32_t all[NF_CT_TUPLE_L3SIZE]; | ||
72 | u_int32_t ip; | ||
73 | u_int32_t ip6[4]; | ||
74 | } u3; | ||
75 | union { | 71 | union { |
76 | /* Add other protocols here. */ | 72 | /* Add other protocols here. */ |
77 | u_int16_t all; | 73 | u_int16_t all; |