aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/nf_conntrack_proto_dccp.c
diff options
context:
space:
mode:
authorChangli Gao <xiaosuo@gmail.com>2010-11-12 17:33:17 +0100
committerPatrick McHardy <kaber@trash.net>2010-11-12 17:33:17 +0100
commite5fc9e7a666e5964b60e05903b90aa832354b68c (patch)
treef7cff583883389616369687a4658c0a79409f0fd /net/netfilter/nf_conntrack_proto_dccp.c
parentc753796769e4fb0cd813b6e5801b3c01f4681d4f (diff)
downloadkernel_samsung_smdk4412-e5fc9e7a666e5964b60e05903b90aa832354b68c.zip
kernel_samsung_smdk4412-e5fc9e7a666e5964b60e05903b90aa832354b68c.tar.gz
kernel_samsung_smdk4412-e5fc9e7a666e5964b60e05903b90aa832354b68c.tar.bz2
netfilter: nf_conntrack: don't always initialize ct->proto
ct->proto is big(60 bytes) due to structure ip_ct_tcp, and we don't need to initialize the whole for all the other protocols. This patch moves proto to the end of structure nf_conn, and pushes the initialization down to the individual protocols. Signed-off-by: Changli Gao <xiaosuo@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/netfilter/nf_conntrack_proto_dccp.c')
-rw-r--r--net/netfilter/nf_conntrack_proto_dccp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/netfilter/nf_conntrack_proto_dccp.c b/net/netfilter/nf_conntrack_proto_dccp.c
index 5292560..9ae57c5 100644
--- a/net/netfilter/nf_conntrack_proto_dccp.c
+++ b/net/netfilter/nf_conntrack_proto_dccp.c
@@ -452,6 +452,9 @@ static bool dccp_new(struct nf_conn *ct, const struct sk_buff *skb,
ct->proto.dccp.role[IP_CT_DIR_ORIGINAL] = CT_DCCP_ROLE_CLIENT;
ct->proto.dccp.role[IP_CT_DIR_REPLY] = CT_DCCP_ROLE_SERVER;
ct->proto.dccp.state = CT_DCCP_NONE;
+ ct->proto.dccp.last_pkt = DCCP_PKT_REQUEST;
+ ct->proto.dccp.last_dir = IP_CT_DIR_ORIGINAL;
+ ct->proto.dccp.handshake_seq = 0;
return true;
out_invalid: