aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/input.c')
-rw-r--r--net/sctp/input.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 42b66e74bbb5..64f630102532 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -218,17 +218,11 @@ int sctp_rcv(struct sk_buff *skb)
218 } 218 }
219 } 219 }
220 220
221 /* SCTP seems to always need a timestamp right now (FIXME) */
222 if (skb->tstamp.off_sec == 0) {
223 __net_timestamp(skb);
224 sock_enable_timestamp(sk);
225 }
226
227 if (!xfrm_policy_check(sk, XFRM_POLICY_IN, skb, family)) 221 if (!xfrm_policy_check(sk, XFRM_POLICY_IN, skb, family))
228 goto discard_release; 222 goto discard_release;
229 nf_reset(skb); 223 nf_reset(skb);
230 224
231 if (sk_filter(sk, skb, 1)) 225 if (sk_filter(sk, skb))
232 goto discard_release; 226 goto discard_release;
233 227
234 /* Create an SCTP packet structure. */ 228 /* Create an SCTP packet structure. */
@@ -255,10 +249,13 @@ int sctp_rcv(struct sk_buff *skb)
255 */ 249 */
256 sctp_bh_lock_sock(sk); 250 sctp_bh_lock_sock(sk);
257 251
258 if (sock_owned_by_user(sk)) 252 if (sock_owned_by_user(sk)) {
253 SCTP_INC_STATS_BH(SCTP_MIB_IN_PKT_BACKLOG);
259 sctp_add_backlog(sk, skb); 254 sctp_add_backlog(sk, skb);
260 else 255 } else {
256 SCTP_INC_STATS_BH(SCTP_MIB_IN_PKT_SOFTIRQ);
261 sctp_inq_push(&chunk->rcvr->inqueue, chunk); 257 sctp_inq_push(&chunk->rcvr->inqueue, chunk);
258 }
262 259
263 sctp_bh_unlock_sock(sk); 260 sctp_bh_unlock_sock(sk);
264 261
@@ -271,6 +268,7 @@ int sctp_rcv(struct sk_buff *skb)
271 return 0; 268 return 0;
272 269
273discard_it: 270discard_it:
271 SCTP_INC_STATS_BH(SCTP_MIB_IN_PKT_DISCARDS);
274 kfree_skb(skb); 272 kfree_skb(skb);
275 return 0; 273 return 0;
276 274
@@ -384,7 +382,7 @@ void sctp_icmp_frag_needed(struct sock *sk, struct sctp_association *asoc,
384 * pmtu discovery on this transport. 382 * pmtu discovery on this transport.
385 */ 383 */
386 t->pathmtu = SCTP_DEFAULT_MINSEGMENT; 384 t->pathmtu = SCTP_DEFAULT_MINSEGMENT;
387 t->param_flags = (t->param_flags & ~SPP_HB) | 385 t->param_flags = (t->param_flags & ~SPP_PMTUD) |
388 SPP_PMTUD_DISABLE; 386 SPP_PMTUD_DISABLE;
389 } else { 387 } else {
390 t->pathmtu = pmtu; 388 t->pathmtu = pmtu;