aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 11:39:20 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 11:39:20 -0500
commitb55813a2e50088ca30df33fa62aeed5d3adb1796 (patch)
treebe50fe404e94869fe854766e190a5753dbc7dd49 /net/sctp
parent368d17e068f691dba5a4f122c271db5ec9b2ebd6 (diff)
parent9e19bb6d7a0959f5028d46e1ab99c50f0d36eda8 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [NETFILTER] x_table.c: sem2mutex [IPV4]: Aggregate route entries with different TOS values [TCP]: Mark tcp_*mem[] __read_mostly. [TCP]: Set default max buffers from memory pool size [SCTP]: Fix up sctp_rcv return value [NET]: Take RTNL when unregistering notifier [WIRELESS]: Fix config dependencies. [NET]: Fill in a 32-bit hole in struct sock on 64-bit platforms. [NET]: Ensure device name passed to SO_BINDTODEVICE is NULL terminated. [MODULES]: Don't allow statically declared exports [BRIDGE]: Unaligned accesses in the ethernet bridge
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/input.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c
index cb78b50868ee..d117ebc75cf8 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -127,7 +127,6 @@ int sctp_rcv(struct sk_buff *skb)
127 union sctp_addr dest; 127 union sctp_addr dest;
128 int family; 128 int family;
129 struct sctp_af *af; 129 struct sctp_af *af;
130 int ret = 0;
131 130
132 if (skb->pkt_type!=PACKET_HOST) 131 if (skb->pkt_type!=PACKET_HOST)
133 goto discard_it; 132 goto discard_it;
@@ -227,16 +226,13 @@ int sctp_rcv(struct sk_buff *skb)
227 goto discard_release; 226 goto discard_release;
228 nf_reset(skb); 227 nf_reset(skb);
229 228
230 ret = sk_filter(sk, skb, 1); 229 if (sk_filter(sk, skb, 1))
231 if (ret)
232 goto discard_release; 230 goto discard_release;
233 231
234 /* Create an SCTP packet structure. */ 232 /* Create an SCTP packet structure. */
235 chunk = sctp_chunkify(skb, asoc, sk); 233 chunk = sctp_chunkify(skb, asoc, sk);
236 if (!chunk) { 234 if (!chunk)
237 ret = -ENOMEM;
238 goto discard_release; 235 goto discard_release;
239 }
240 SCTP_INPUT_CB(skb)->chunk = chunk; 236 SCTP_INPUT_CB(skb)->chunk = chunk;
241 237
242 /* Remember what endpoint is to handle this packet. */ 238 /* Remember what endpoint is to handle this packet. */
@@ -277,11 +273,11 @@ int sctp_rcv(struct sk_buff *skb)
277 sctp_bh_unlock_sock(sk); 273 sctp_bh_unlock_sock(sk);
278 sock_put(sk); 274 sock_put(sk);
279 275
280 return ret; 276 return 0;
281 277
282discard_it: 278discard_it:
283 kfree_skb(skb); 279 kfree_skb(skb);
284 return ret; 280 return 0;
285 281
286discard_release: 282discard_release:
287 /* Release any structures we may be holding. */ 283 /* Release any structures we may be holding. */