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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 1662f9cc869..42b66e74bbb 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -141,7 +141,8 @@ int sctp_rcv(struct sk_buff *skb)
141 __skb_pull(skb, skb->h.raw - skb->data); 141 __skb_pull(skb, skb->h.raw - skb->data);
142 if (skb->len < sizeof(struct sctphdr)) 142 if (skb->len < sizeof(struct sctphdr))
143 goto discard_it; 143 goto discard_it;
144 if (sctp_rcv_checksum(skb) < 0) 144 if ((skb->ip_summed != CHECKSUM_UNNECESSARY) &&
145 (sctp_rcv_checksum(skb) < 0))
145 goto discard_it; 146 goto discard_it;
146 147
147 skb_pull(skb, sizeof(struct sctphdr)); 148 skb_pull(skb, sizeof(struct sctphdr));
@@ -170,7 +171,8 @@ int sctp_rcv(struct sk_buff *skb)
170 * IP broadcast addresses cannot be used in an SCTP transport 171 * IP broadcast addresses cannot be used in an SCTP transport
171 * address." 172 * address."
172 */ 173 */
173 if (!af->addr_valid(&src, NULL) || !af->addr_valid(&dest, NULL)) 174 if (!af->addr_valid(&src, NULL, skb) ||
175 !af->addr_valid(&dest, NULL, skb))
174 goto discard_it; 176 goto discard_it;
175 177
176 asoc = __sctp_rcv_lookup(skb, &src, &dest, &transport); 178 asoc = __sctp_rcv_lookup(skb, &src, &dest, &transport);