Thread (3 messages) 3 messages, 3 authors, 23d ago

Re: [PATCH net] amt: fix size calculation in amt_get_size()

From: Kuniyuki Iwashima <kuniyu@google.com>
Date: 2026-07-02 02:51:11

On Wed, Jul 1, 2026 at 5:23 AM Eric Dumazet [off-list ref] wrote:
amt_get_size() incorrectly used sizeof(struct iphdr) for the sizes of
IFLA_AMT_DISCOVERY_IP, IFLA_AMT_REMOTE_IP, and IFLA_AMT_LOCAL_IP.
These attributes contain IPv4 addresses (__be32), not full IP headers.

Replace sizeof(struct iphdr) with sizeof(__be32) to avoid over-allocating
netlink message space.

Fixes: b9022b53adad ("amt: add control plane of amt interface")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help