uevent: use add_uevent_var() instead of open coding it
[pandora-kernel.git] / net / sctp / input.c
index f38e91b..885109f 100644 (file)
@@ -140,8 +140,7 @@ int sctp_rcv(struct sk_buff *skb)
        __skb_pull(skb, skb_transport_offset(skb));
        if (skb->len < sizeof(struct sctphdr))
                goto discard_it;
-       if ((skb->ip_summed != CHECKSUM_UNNECESSARY) &&
-           (sctp_rcv_checksum(skb) < 0))
+       if (!skb_csum_unnecessary(skb) && sctp_rcv_checksum(skb) < 0)
                goto discard_it;
 
        skb_pull(skb, sizeof(struct sctphdr));
@@ -513,7 +512,7 @@ void sctp_v4_err(struct sk_buff *skb, __u32 info)
        struct sctp_association *asoc = NULL;
        struct sctp_transport *transport;
        struct inet_sock *inet;
-       char *saveip, *savesctp;
+       sk_buff_data_t saveip, savesctp;
        int err;
 
        if (skb->len < ihlen + 8) {
@@ -522,14 +521,14 @@ void sctp_v4_err(struct sk_buff *skb, __u32 info)
        }
 
        /* Fix up skb to look at the embedded net header. */
-       saveip = skb->nh.raw;
-       savesctp  = skb->h.raw;
+       saveip = skb->network_header;
+       savesctp = skb->transport_header;
        skb_reset_network_header(skb);
        skb_set_transport_header(skb, ihlen);
        sk = sctp_err_lookup(AF_INET, skb, sctp_hdr(skb), &asoc, &transport);
-       /* Put back, the original pointers. */
-       skb->nh.raw = saveip;
-       skb->h.raw = savesctp;
+       /* Put back, the original values. */
+       skb->network_header = saveip;
+       skb->transport_header = savesctp;
        if (!sk) {
                ICMP_INC_STATS_BH(ICMP_MIB_INERRORS);
                return;
@@ -612,7 +611,7 @@ int sctp_rcv_ootb(struct sk_buff *skb)
                        break;
 
                ch_end = ((__u8 *)ch) + WORD_ROUND(ntohs(ch->length));
-               if (ch_end > skb->tail)
+               if (ch_end > skb_tail_pointer(skb))
                        break;
 
                /* RFC 8.4, 2) If the OOTB packet contains an ABORT chunk, the
@@ -644,7 +643,7 @@ int sctp_rcv_ootb(struct sk_buff *skb)
                }
 
                ch = (sctp_chunkhdr_t *) ch_end;
-       } while (ch_end < skb->tail);
+       } while (ch_end < skb_tail_pointer(skb));
 
        return 0;