mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 16:11:45 +00:00
[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>
This commit is contained in:
parent
e023dd6437
commit
eddc9ec53b
132 changed files with 565 additions and 564 deletions
|
@ -292,7 +292,7 @@ static int raw_send_hdrinc(struct sock *sk, void *from, size_t length,
|
|||
skb->dst = dst_clone(&rt->u.dst);
|
||||
|
||||
skb_reset_network_header(skb);
|
||||
iph = skb->nh.iph;
|
||||
iph = ip_hdr(skb);
|
||||
skb_put(skb, length);
|
||||
|
||||
skb->ip_summed = CHECKSUM_NONE;
|
||||
|
@ -615,7 +615,7 @@ static int raw_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
|
|||
/* Copy the address. */
|
||||
if (sin) {
|
||||
sin->sin_family = AF_INET;
|
||||
sin->sin_addr.s_addr = skb->nh.iph->saddr;
|
||||
sin->sin_addr.s_addr = ip_hdr(skb)->saddr;
|
||||
sin->sin_port = 0;
|
||||
memset(&sin->sin_zero, 0, sizeof(sin->sin_zero));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue