diff options
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
-rw-r--r-- | net/sctp/sm_make_chunk.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index f7fb29d5a0c7..be783a3761c4 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -86,7 +86,7 @@ int sctp_chunk_iif(const struct sctp_chunk *chunk) | |||
86 | struct sctp_af *af; | 86 | struct sctp_af *af; |
87 | int iif = 0; | 87 | int iif = 0; |
88 | 88 | ||
89 | af = sctp_get_af_specific(ipver2af(chunk->skb->nh.iph->version)); | 89 | af = sctp_get_af_specific(ipver2af(ip_hdr(chunk->skb)->version)); |
90 | if (af) | 90 | if (af) |
91 | iif = af->skb_iif(chunk->skb); | 91 | iif = af->skb_iif(chunk->skb); |
92 | 92 | ||
@@ -1143,7 +1143,7 @@ void *sctp_addto_chunk(struct sctp_chunk *chunk, int len, const void *data) | |||
1143 | 1143 | ||
1144 | /* Adjust the chunk length field. */ | 1144 | /* Adjust the chunk length field. */ |
1145 | chunk->chunk_hdr->length = htons(chunklen + padlen + len); | 1145 | chunk->chunk_hdr->length = htons(chunklen + padlen + len); |
1146 | chunk->chunk_end = chunk->skb->tail; | 1146 | chunk->chunk_end = skb_tail_pointer(chunk->skb); |
1147 | 1147 | ||
1148 | return target; | 1148 | return target; |
1149 | } | 1149 | } |
@@ -1168,7 +1168,7 @@ int sctp_user_addto_chunk(struct sctp_chunk *chunk, int off, int len, | |||
1168 | /* Adjust the chunk length field. */ | 1168 | /* Adjust the chunk length field. */ |
1169 | chunk->chunk_hdr->length = | 1169 | chunk->chunk_hdr->length = |
1170 | htons(ntohs(chunk->chunk_hdr->length) + len); | 1170 | htons(ntohs(chunk->chunk_hdr->length) + len); |
1171 | chunk->chunk_end = chunk->skb->tail; | 1171 | chunk->chunk_end = skb_tail_pointer(chunk->skb); |
1172 | 1172 | ||
1173 | out: | 1173 | out: |
1174 | return err; | 1174 | return err; |
@@ -1233,7 +1233,7 @@ struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *ep, | |||
1233 | asoc->temp = 1; | 1233 | asoc->temp = 1; |
1234 | skb = chunk->skb; | 1234 | skb = chunk->skb; |
1235 | /* Create an entry for the source address of the packet. */ | 1235 | /* Create an entry for the source address of the packet. */ |
1236 | af = sctp_get_af_specific(ipver2af(skb->nh.iph->version)); | 1236 | af = sctp_get_af_specific(ipver2af(ip_hdr(skb)->version)); |
1237 | if (unlikely(!af)) | 1237 | if (unlikely(!af)) |
1238 | goto fail; | 1238 | goto fail; |
1239 | af->from_skb(&asoc->c.peer_addr, skb, 1); | 1239 | af->from_skb(&asoc->c.peer_addr, skb, 1); |
@@ -2077,7 +2077,7 @@ static int sctp_process_param(struct sctp_association *asoc, | |||
2077 | 2077 | ||
2078 | default: /* Just ignore anything else. */ | 2078 | default: /* Just ignore anything else. */ |
2079 | break; | 2079 | break; |
2080 | }; | 2080 | } |
2081 | } | 2081 | } |
2082 | break; | 2082 | break; |
2083 | 2083 | ||
@@ -2118,7 +2118,7 @@ static int sctp_process_param(struct sctp_association *asoc, | |||
2118 | SCTP_DEBUG_PRINTK("Ignoring param: %d for association %p.\n", | 2118 | SCTP_DEBUG_PRINTK("Ignoring param: %d for association %p.\n", |
2119 | ntohs(param.p->type), asoc); | 2119 | ntohs(param.p->type), asoc); |
2120 | break; | 2120 | break; |
2121 | }; | 2121 | } |
2122 | 2122 | ||
2123 | return retval; | 2123 | return retval; |
2124 | } | 2124 | } |