diff options
Diffstat (limited to 'net/sctp/input.c')
-rw-r--r-- | net/sctp/input.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c index 28f32243397f..b24ff2c1aef5 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c | |||
@@ -100,21 +100,6 @@ static inline int sctp_rcv_checksum(struct sk_buff *skb) | |||
100 | return 0; | 100 | return 0; |
101 | } | 101 | } |
102 | 102 | ||
103 | /* The free routine for skbuffs that sctp receives */ | ||
104 | static void sctp_rfree(struct sk_buff *skb) | ||
105 | { | ||
106 | atomic_sub(sizeof(struct sctp_chunk),&skb->sk->sk_rmem_alloc); | ||
107 | sock_rfree(skb); | ||
108 | } | ||
109 | |||
110 | /* The ownership wrapper routine to do receive buffer accounting */ | ||
111 | static void sctp_rcv_set_owner_r(struct sk_buff *skb, struct sock *sk) | ||
112 | { | ||
113 | skb_set_owner_r(skb,sk); | ||
114 | skb->destructor = sctp_rfree; | ||
115 | atomic_add(sizeof(struct sctp_chunk),&sk->sk_rmem_alloc); | ||
116 | } | ||
117 | |||
118 | struct sctp_input_cb { | 103 | struct sctp_input_cb { |
119 | union { | 104 | union { |
120 | struct inet_skb_parm h4; | 105 | struct inet_skb_parm h4; |
@@ -217,9 +202,6 @@ int sctp_rcv(struct sk_buff *skb) | |||
217 | rcvr = &ep->base; | 202 | rcvr = &ep->base; |
218 | } | 203 | } |
219 | 204 | ||
220 | if (atomic_read(&sk->sk_rmem_alloc) >= sk->sk_rcvbuf) | ||
221 | goto discard_release; | ||
222 | |||
223 | /* | 205 | /* |
224 | * RFC 2960, 8.4 - Handle "Out of the blue" Packets. | 206 | * RFC 2960, 8.4 - Handle "Out of the blue" Packets. |
225 | * An SCTP packet is called an "out of the blue" (OOTB) | 207 | * An SCTP packet is called an "out of the blue" (OOTB) |
@@ -256,8 +238,6 @@ int sctp_rcv(struct sk_buff *skb) | |||
256 | } | 238 | } |
257 | SCTP_INPUT_CB(skb)->chunk = chunk; | 239 | SCTP_INPUT_CB(skb)->chunk = chunk; |
258 | 240 | ||
259 | sctp_rcv_set_owner_r(skb,sk); | ||
260 | |||
261 | /* Remember what endpoint is to handle this packet. */ | 241 | /* Remember what endpoint is to handle this packet. */ |
262 | chunk->rcvr = rcvr; | 242 | chunk->rcvr = rcvr; |
263 | 243 | ||