diff options
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 13875e8419a7..926404c5e58c 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -420,7 +420,7 @@ static void udp4_hwcsum_outgoing(struct sock *sk, struct sk_buff *skb, | |||
420 | __be32 src, __be32 dst, int len ) | 420 | __be32 src, __be32 dst, int len ) |
421 | { | 421 | { |
422 | unsigned int offset; | 422 | unsigned int offset; |
423 | struct udphdr *uh = skb->h.uh; | 423 | struct udphdr *uh = udp_hdr(skb); |
424 | __wsum csum = 0; | 424 | __wsum csum = 0; |
425 | 425 | ||
426 | if (skb_queue_len(&sk->sk_write_queue) == 1) { | 426 | if (skb_queue_len(&sk->sk_write_queue) == 1) { |
@@ -470,7 +470,7 @@ static int udp_push_pending_frames(struct sock *sk) | |||
470 | /* | 470 | /* |
471 | * Create a UDP header | 471 | * Create a UDP header |
472 | */ | 472 | */ |
473 | uh = skb->h.uh; | 473 | uh = udp_hdr(skb); |
474 | uh->source = fl->fl_ip_sport; | 474 | uh->source = fl->fl_ip_sport; |
475 | uh->dest = fl->fl_ip_dport; | 475 | uh->dest = fl->fl_ip_dport; |
476 | uh->len = htons(up->len); | 476 | uh->len = htons(up->len); |
@@ -866,7 +866,7 @@ try_again: | |||
866 | if (sin) | 866 | if (sin) |
867 | { | 867 | { |
868 | sin->sin_family = AF_INET; | 868 | sin->sin_family = AF_INET; |
869 | sin->sin_port = skb->h.uh->source; | 869 | sin->sin_port = udp_hdr(skb)->source; |
870 | sin->sin_addr.s_addr = ip_hdr(skb)->saddr; | 870 | sin->sin_addr.s_addr = ip_hdr(skb)->saddr; |
871 | memset(sin->sin_zero, 0, sizeof(sin->sin_zero)); | 871 | memset(sin->sin_zero, 0, sizeof(sin->sin_zero)); |
872 | } | 872 | } |
@@ -949,7 +949,7 @@ static int udp_encap_rcv(struct sock * sk, struct sk_buff *skb) | |||
949 | return 1; | 949 | return 1; |
950 | 950 | ||
951 | /* Now we can get the pointers */ | 951 | /* Now we can get the pointers */ |
952 | uh = skb->h.uh; | 952 | uh = udp_hdr(skb); |
953 | udpdata = (__u8 *)uh + sizeof(struct udphdr); | 953 | udpdata = (__u8 *)uh + sizeof(struct udphdr); |
954 | udpdata32 = (__be32 *)udpdata; | 954 | udpdata32 = (__be32 *)udpdata; |
955 | 955 | ||
@@ -1207,7 +1207,7 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct hlist_head udptable[], | |||
1207 | int proto) | 1207 | int proto) |
1208 | { | 1208 | { |
1209 | struct sock *sk; | 1209 | struct sock *sk; |
1210 | struct udphdr *uh = skb->h.uh; | 1210 | struct udphdr *uh = udp_hdr(skb); |
1211 | unsigned short ulen; | 1211 | unsigned short ulen; |
1212 | struct rtable *rt = (struct rtable*)skb->dst; | 1212 | struct rtable *rt = (struct rtable*)skb->dst; |
1213 | __be32 saddr = ip_hdr(skb)->saddr; | 1213 | __be32 saddr = ip_hdr(skb)->saddr; |
@@ -1227,7 +1227,7 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct hlist_head udptable[], | |||
1227 | /* UDP validates ulen. */ | 1227 | /* UDP validates ulen. */ |
1228 | if (ulen < sizeof(*uh) || pskb_trim_rcsum(skb, ulen)) | 1228 | if (ulen < sizeof(*uh) || pskb_trim_rcsum(skb, ulen)) |
1229 | goto short_packet; | 1229 | goto short_packet; |
1230 | uh = skb->h.uh; | 1230 | uh = udp_hdr(skb); |
1231 | } | 1231 | } |
1232 | 1232 | ||
1233 | if (udp4_csum_init(skb, uh, proto)) | 1233 | if (udp4_csum_init(skb, uh, proto)) |