From e5c4be4a96443750fad42e4533c1af8256c42211 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Mon, 14 Jan 2008 23:47:25 -0800 Subject: [PATCH] --- yaml --- r: 78837 b: refs/heads/master c: 4a64830af0fd4dbec908cfbab117def5086acd4a h: refs/heads/master i: 78835: 51f0e6c5b3d16cc31c84f74fafded9776cc64ed1 v: v3 --- [refs] | 2 +- trunk/net/netfilter/nf_conntrack_proto_sctp.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index b1334efe0f4c..d234e583c91c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: efe9f68afeaf2ce12636990a8c811fb1cc23b12b +refs/heads/master: 4a64830af0fd4dbec908cfbab117def5086acd4a diff --git a/trunk/net/netfilter/nf_conntrack_proto_sctp.c b/trunk/net/netfilter/nf_conntrack_proto_sctp.c index 7baabc045342..177e8f60aa1c 100644 --- a/trunk/net/netfilter/nf_conntrack_proto_sctp.c +++ b/trunk/net/netfilter/nf_conntrack_proto_sctp.c @@ -325,9 +325,8 @@ static int sctp_packet(struct nf_conn *ct, } old_state = new_state = SCTP_CONNTRACK_MAX; + write_lock_bh(&sctp_lock); for_each_sctp_chunk (skb, sch, _sch, offset, dataoff, count) { - write_lock_bh(&sctp_lock); - /* Special cases of Verification tag check (Sec 8.5.1) */ if (sch->type == SCTP_CID_INIT) { /* Sec 8.5.1 (A) */ @@ -378,8 +377,8 @@ static int sctp_packet(struct nf_conn *ct, ct->proto.sctp.state = new_state; if (old_state != new_state) nf_conntrack_event_cache(IPCT_PROTOINFO, skb); - write_unlock_bh(&sctp_lock); } + write_unlock_bh(&sctp_lock); nf_ct_refresh_acct(ct, ctinfo, skb, *sctp_timeouts[new_state]);