inet: constify ip headers and in6_addr
[deliverable/linux.git] / net / sctp / input.c
index 30cec7732e801d6f5d9f9c12f5a7753afe658579..741ed1648838c49d708b126a4d1189236d42a668 100644 (file)
@@ -565,7 +565,7 @@ void sctp_err_finish(struct sock *sk, struct sctp_association *asoc)
  */
 void sctp_v4_err(struct sk_buff *skb, __u32 info)
 {
-       struct iphdr *iph = (struct iphdr *)skb->data;
+       const struct iphdr *iph = (const struct iphdr *)skb->data;
        const int ihlen = iph->ihl * 4;
        const int type = icmp_hdr(skb)->type;
        const int code = icmp_hdr(skb)->code;
@@ -661,7 +661,6 @@ static int sctp_rcv_ootb(struct sk_buff *skb)
 {
        sctp_chunkhdr_t *ch;
        __u8 *ch_end;
-       sctp_errhdr_t *err;
 
        ch = (sctp_chunkhdr_t *) skb->data;
 
@@ -697,20 +696,6 @@ static int sctp_rcv_ootb(struct sk_buff *skb)
                if (SCTP_CID_INIT == ch->type && (void *)ch != skb->data)
                        goto discard;
 
-               /* RFC 8.4, 7) If the packet contains a "Stale cookie" ERROR
-                * or a COOKIE ACK the SCTP Packet should be silently
-                * discarded.
-                */
-               if (SCTP_CID_COOKIE_ACK == ch->type)
-                       goto discard;
-
-               if (SCTP_CID_ERROR == ch->type) {
-                       sctp_walk_errors(err, ch) {
-                               if (SCTP_ERROR_STALE_COOKIE == err->cause)
-                                       goto discard;
-                       }
-               }
-
                ch = (sctp_chunkhdr_t *) ch_end;
        } while (ch_end < skb_tail_pointer(skb));
 
This page took 0.027551 seconds and 5 git commands to generate.