You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Name the tree/revision/version
from 9dd5316deae6402de68ddc8a08d1a6b496101828
Currently the default value of ra_mtu is 0, but it causes an error in parsing the config file.
int config_parse_interface(void *data, size_t len, const char *name, bool overwrite)
~ To line number 780~
if ((c = tb[IFACE_ATTR_RA_MTU])) {
uint32_t ra_mtu = blobmsg_get_u32(c);
if (ra_mtu < 1280 || ra_mtu > 65535)
goto err;
iface->ra_mtu = ra_mtu;
}
ra_mtu is checked with the following and it looks fine.
static int send_router_advert(struct interface *iface, const struct in6_addr *from)
~to line number 477~
if (mtu == 0)
mtu = odhcpd_get_interface_config(iface->ifname, "mtu");
if (mtu < 1280)
mtu = 1280;
To fix this issue, my suggest is
Add write to syslog on parse error detail in config_parse_interface.
Fix README.md ra_mtu default value is not zero, It's 1280.
Remove detailed error check on parse, if always checked at the time of use.
Or set to default value on error.
Thanks.
The text was updated successfully, but these errors were encountered:
I fail to understand the issue as the code in config.c is only hit when a ra_mtu value is specified in the dhcp interface uci section; but this is not by default the case as the default config does not have a ra_mtu value (https://github.com/openwrt/openwrt/blob/master/package/network/services/odhcpd/files/odhcpd.defaults)
One could indeed argue if an invalid ra_mtu is specified if this should be considered as a fatal error; maybe a better approach is just ignore it and write to syslog
morohe:
Name the tree/revision/version
from 9dd5316deae6402de68ddc8a08d1a6b496101828
Currently the default value of ra_mtu is 0, but it causes an error in parsing the config file.
ra_mtu is checked with the following and it looks fine.
To fix this issue, my suggest is
Thanks.
The text was updated successfully, but these errors were encountered: