diff options
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r-- | net/ipv4/raw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index c3757bb270ca..ac57afa7c316 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -292,7 +292,7 @@ static int raw_send_hdrinc(struct sock *sk, void *from, size_t length, | |||
292 | skb->dst = dst_clone(&rt->u.dst); | 292 | skb->dst = dst_clone(&rt->u.dst); |
293 | 293 | ||
294 | skb_reset_network_header(skb); | 294 | skb_reset_network_header(skb); |
295 | iph = skb->nh.iph; | 295 | iph = ip_hdr(skb); |
296 | skb_put(skb, length); | 296 | skb_put(skb, length); |
297 | 297 | ||
298 | skb->ip_summed = CHECKSUM_NONE; | 298 | skb->ip_summed = CHECKSUM_NONE; |
@@ -615,7 +615,7 @@ static int raw_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
615 | /* Copy the address. */ | 615 | /* Copy the address. */ |
616 | if (sin) { | 616 | if (sin) { |
617 | sin->sin_family = AF_INET; | 617 | sin->sin_family = AF_INET; |
618 | sin->sin_addr.s_addr = skb->nh.iph->saddr; | 618 | sin->sin_addr.s_addr = ip_hdr(skb)->saddr; |
619 | sin->sin_port = 0; | 619 | sin->sin_port = 0; |
620 | memset(&sin->sin_zero, 0, sizeof(sin->sin_zero)); | 620 | memset(&sin->sin_zero, 0, sizeof(sin->sin_zero)); |
621 | } | 621 | } |