mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
gnrc_netif2: adapt setting of maximum packet size for slipdev
This commit is contained in:
parent
6038a7d3a5
commit
852cb5a791
@ -1100,11 +1100,17 @@ static void _init_from_device(gnrc_netif2_t *netif)
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
res = dev->driver->get(dev, NETOPT_MAX_PACKET_SIZE, &tmp, sizeof(tmp));
|
|
||||||
assert(res == sizeof(tmp));
|
|
||||||
#ifdef MODULE_GNRC_IPV6
|
#ifdef MODULE_GNRC_IPV6
|
||||||
|
res = dev->driver->get(dev, NETOPT_MAX_PACKET_SIZE, &tmp, sizeof(tmp));
|
||||||
|
if (res < 0) {
|
||||||
|
/* assume maximum possible transition unit */
|
||||||
|
netif->ipv6.mtu = UINT16_MAX;
|
||||||
|
}
|
||||||
|
else {
|
||||||
netif->ipv6.mtu = tmp;
|
netif->ipv6.mtu = tmp;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
_update_l2addr_from_dev(netif);
|
_update_l2addr_from_dev(netif);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user