Currently the default value of ra_mtu is 0, but it causes an error in parsing the config file.
config.c 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.
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.