diff options
author | Changli Gao <xiaosuo@gmail.com> | 2010-11-12 16:33:17 (GMT) |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-11-12 16:33:17 (GMT) |
commit | e5fc9e7a666e5964b60e05903b90aa832354b68c (patch) | |
tree | f7cff583883389616369687a4658c0a79409f0fd /net/netfilter/nf_conntrack_proto_sctp.c | |
parent | c753796769e4fb0cd813b6e5801b3c01f4681d4f (diff) | |
download | linux-fsl-qoriq-e5fc9e7a666e5964b60e05903b90aa832354b68c.tar.xz |
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_sctp.c')
-rw-r--r-- | net/netfilter/nf_conntrack_proto_sctp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/netfilter/nf_conntrack_proto_sctp.c b/net/netfilter/nf_conntrack_proto_sctp.c index c6049c2..6f4ee70 100644 --- a/net/netfilter/nf_conntrack_proto_sctp.c +++ b/net/netfilter/nf_conntrack_proto_sctp.c @@ -413,6 +413,7 @@ static bool sctp_new(struct nf_conn *ct, const struct sk_buff *skb, test_bit(SCTP_CID_COOKIE_ACK, map)) return false; + memset(&ct->proto.sctp, 0, sizeof(ct->proto.sctp)); new_state = SCTP_CONNTRACK_MAX; for_each_sctp_chunk (skb, sch, _sch, offset, dataoff, count) { /* Don't need lock here: this conntrack not in circulation yet */ |