From 4711abcf932083f986a878f71b7cd56f9ff14883 Mon Sep 17 00:00:00 2001 From: daniellizewski Date: Mon, 11 May 2026 12:54:55 -0400 Subject: [PATCH] net/icmpv6/icmpv6_input.c: Dont increase d_pktsize from router advertise An IPV6 Router advertisement can have an MTU max option. This option should not increase the d_pktsize for a given interface since that max size might have been set based on CONFIG or buffer size. Signed-off-by: daniellizewski --- net/icmpv6/icmpv6_input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/icmpv6/icmpv6_input.c b/net/icmpv6/icmpv6_input.c index 28792be0ca1..f7572e8d8a3 100644 --- a/net/icmpv6/icmpv6_input.c +++ b/net/icmpv6/icmpv6_input.c @@ -481,7 +481,8 @@ void icmpv6_input(FAR struct net_driver_s *dev, unsigned int iplen) { FAR struct icmpv6_mtu_s *mtuopt = (FAR struct icmpv6_mtu_s *)opt; - dev->d_pktsize = NTOHS(mtuopt->mtu[1]) + dev->d_llhdrlen; + dev->d_pktsize = MIN(dev->d_pktsize, + NTOHS(mtuopt->mtu[1]) + dev->d_llhdrlen); } break;