aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/protocol.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-04-21 01:47:35 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:25:10 -0400
commiteddc9ec53be2ecdbf4efe0efd4a83052594f0ac0 (patch)
tree4a38ab4dbd9d61fdf5a5ea6ed61463e0b9e33ba7 /net/sctp/protocol.c
parente023dd643798c4f06c16466af90b4d250e4b8bd7 (diff)
[SK_BUFF]: Introduce ip_hdr(), remove skb->nh.iph
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/protocol.c')
-rw-r--r--net/sctp/protocol.c8
1 files changed, 4 insertions, 4 deletions
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