aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/input.c2
-rw-r--r--net/sctp/ipv6.c4
-rw-r--r--net/sctp/protocol.c8
-rw-r--r--net/sctp/sm_make_chunk.c4
-rw-r--r--net/sctp/sm_statefuns.c2
5 files changed, 10 insertions, 10 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 2b0863aba3fb..595fe32b3d41 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -154,7 +154,7 @@ int sctp_rcv(struct sk_buff *skb)
154 if (skb->len < sizeof(struct sctp_chunkhdr)) 154 if (skb->len < sizeof(struct sctp_chunkhdr))
155 goto discard_it; 155 goto discard_it;
156 156
157 family = ipver2af(skb->nh.iph->version); 157 family = ipver2af(ip_hdr(skb)->version);
158 af = sctp_get_af_specific(family); 158 af = sctp_get_af_specific(family);
159 if (unlikely(!af)) 159 if (unlikely(!af))
160 goto discard_it; 160 goto discard_it;
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index 5f9b145b0b90..742f9ff42fbf 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -770,9 +770,9 @@ static void sctp_inet6_skb_msgname(struct sk_buff *skb, char *msgname,
770 770
771 /* Map ipv4 address into v4-mapped-on-v6 address. */ 771 /* Map ipv4 address into v4-mapped-on-v6 address. */
772 if (sctp_sk(skb->sk)->v4mapped && 772 if (sctp_sk(skb->sk)->v4mapped &&
773 skb->nh.iph->version == 4) { 773 ip_hdr(skb)->version == 4) {
774 sctp_v4_map_v6((union sctp_addr *)sin6); 774 sctp_v4_map_v6((union sctp_addr *)sin6);
775 sin6->sin6_addr.s6_addr32[3] = skb->nh.iph->saddr; 775 sin6->sin6_addr.s6_addr32[3] = ip_hdr(skb)->saddr;
776 return; 776 return;
777 } 777 }
778 778
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index e17a823ca90f..08f92ba4ebd7 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -238,10 +238,10 @@ static void sctp_v4_from_skb(union sctp_addr *addr, struct sk_buff *skb,
238 sh = (struct sctphdr *) skb->h.raw; 238 sh = (struct sctphdr *) skb->h.raw;
239 if (is_saddr) { 239 if (is_saddr) {
240 *port = sh->source; 240 *port = sh->source;
241 from = &skb->nh.iph->saddr; 241 from = &ip_hdr(skb)->saddr;
242 } else { 242 } else {
243 *port = sh->dest; 243 *port = sh->dest;
244 from = &skb->nh.iph->daddr; 244 from = &ip_hdr(skb)->daddr;
245 } 245 }
246 memcpy(&addr->v4.sin_addr.s_addr, from, sizeof(struct in_addr)); 246 memcpy(&addr->v4.sin_addr.s_addr, from, sizeof(struct in_addr));
247} 247}
@@ -530,7 +530,7 @@ static int sctp_v4_skb_iif(const struct sk_buff *skb)
530/* Was this packet marked by Explicit Congestion Notification? */ 530/* Was this packet marked by Explicit Congestion Notification? */
531static int sctp_v4_is_ce(const struct sk_buff *skb) 531static int sctp_v4_is_ce(const struct sk_buff *skb)
532{ 532{
533 return INET_ECN_is_ce(skb->nh.iph->tos); 533 return INET_ECN_is_ce(ip_hdr(skb)->tos);
534} 534}
535 535
536/* Create and initialize a new sk for the socket returned by accept(). */ 536/* Create and initialize a new sk for the socket returned by accept(). */
@@ -739,7 +739,7 @@ static void sctp_inet_skb_msgname(struct sk_buff *skb, char *msgname, int *len)
739 sin = (struct sockaddr_in *)msgname; 739 sin = (struct sockaddr_in *)msgname;
740 sh = (struct sctphdr *)skb->h.raw; 740 sh = (struct sctphdr *)skb->h.raw;
741 sin->sin_port = sh->source; 741 sin->sin_port = sh->source;
742 sin->sin_addr.s_addr = skb->nh.iph->saddr; 742 sin->sin_addr.s_addr = ip_hdr(skb)->saddr;
743 } 743 }
744} 744}
745 745
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index f7fb29d5a0c7..60c5b59d4c65 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
@@ -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);
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index e9097cf614ba..bf502c499c81 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -5286,7 +5286,7 @@ static int sctp_eat_data(const struct sctp_association *asoc,
5286 chunk->ecn_ce_done = 1; 5286 chunk->ecn_ce_done = 1;
5287 5287
5288 af = sctp_get_af_specific( 5288 af = sctp_get_af_specific(
5289 ipver2af(chunk->skb->nh.iph->version)); 5289 ipver2af(ip_hdr(chunk->skb)->version));
5290 5290
5291 if (af && af->is_ce(chunk->skb) && asoc->peer.ecn_capable) { 5291 if (af && af->is_ce(chunk->skb) && asoc->peer.ecn_capable) {
5292 /* Do real work as sideffect. */ 5292 /* Do real work as sideffect. */