diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-01-17 16:31:30 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-01-17 16:31:30 +0100 |
| commit | 694acfd409e7b6a67869caa31d90d69d7ea3543f (patch) | |
| tree | db4c2ed0496b6e6856bbcb1a2fac6dbfed37ab0f /net/ipv4 | |
| parent | d654a6986a9b41aa727ecf6913675f756830ea2a (diff) | |
| parent | f6044d1fd846ed1ae457975738267214b538a222 (diff) | |
Merge v6.12.66linux-rolling-lts
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv4')
| -rw-r--r-- | net/ipv4/arp.c | 7 | ||||
| -rw-r--r-- | net/ipv4/ping.c | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 8fb48f42581c..7822b2144514 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c @@ -564,7 +564,7 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip, skb_reserve(skb, hlen); skb_reset_network_header(skb); - arp = skb_put(skb, arp_hdr_len(dev)); + skb_put(skb, arp_hdr_len(dev)); skb->dev = dev; skb->protocol = htons(ETH_P_ARP); if (!src_hw) @@ -572,12 +572,13 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip, if (!dest_hw) dest_hw = dev->broadcast; - /* - * Fill the device header for the ARP frame + /* Fill the device header for the ARP frame. + * Note: skb->head can be changed. */ if (dev_hard_header(skb, dev, ptype, dest_hw, src_hw, skb->len) < 0) goto out; + arp = arp_hdr(skb); /* * Fill out the arp protocol part. * diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index 37a3fa98d904..f62b17f59bb4 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c @@ -839,10 +839,8 @@ out: out_free: if (free) kfree(ipc.opt); - if (!err) { - icmp_out_count(sock_net(sk), user_icmph.type); + if (!err) return len; - } return err; do_confirm: |
