summaryrefslogtreecommitdiffstats
path: root/net/ipv4/arp.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 10:10:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 10:10:18 +0000
commitc6fca85f2153de8b2451269de43abcc2aa0213ab (patch)
treeba8548f2df113c7da8a46563947536f455f9a1c0 /net/ipv4/arp.c
parentAdding debian version 6.1.76-1. (diff)
downloadlinux-c6fca85f2153de8b2451269de43abcc2aa0213ab.tar.xz
linux-c6fca85f2153de8b2451269de43abcc2aa0213ab.zip
Merging upstream version 6.1.82.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'net/ipv4/arp.c')
-rw-r--r--net/ipv4/arp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 9456f5bb3..ccff96820 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -1125,7 +1125,8 @@ static int arp_req_get(struct arpreq *r, struct net_device *dev)
if (neigh) {
if (!(READ_ONCE(neigh->nud_state) & NUD_NOARP)) {
read_lock_bh(&neigh->lock);
- memcpy(r->arp_ha.sa_data, neigh->ha, dev->addr_len);
+ memcpy(r->arp_ha.sa_data, neigh->ha,
+ min(dev->addr_len, (unsigned char)sizeof(r->arp_ha.sa_data_min)));
r->arp_flags = arp_state_to_flags(neigh);
read_unlock_bh(&neigh->lock);
r->arp_ha.sa_family = dev->type;