mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
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 <daniellizewski@geotab.com>
This commit is contained in:
parent
8b988e8bd9
commit
4711abcf93
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue