mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 04:52:02 +08:00
Fix ICMPv6 RA parsing procedure
Signed-off-by: luojun1 <luojun1@xiaomi.com>
This commit is contained in:
@@ -312,7 +312,7 @@ void icmpv6_input(FAR struct net_driver_s *dev, unsigned int iplen)
|
||||
options = (FAR uint8_t *)adv +
|
||||
sizeof(struct icmpv6_router_advertise_s);
|
||||
|
||||
for (ndx = 0; ndx + sizeof(struct icmpv6_prefixinfo_s) <= optlen; )
|
||||
for (ndx = 0; ndx < optlen; )
|
||||
{
|
||||
FAR struct icmpv6_generic_s *opt =
|
||||
(FAR struct icmpv6_generic_s *)&options[ndx];
|
||||
@@ -353,7 +353,7 @@ 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 = NTOHL(mtuopt->mtu);
|
||||
dev->d_pktsize = NTOHL(mtuopt->mtu) + dev->d_llhdrlen;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user