Use integer type for mtu variable as odhcpd_get_interface_config returns
-1 when it fails to read the interface mtu. This allows to set the mtu
to a meaningfull value of 1280 in case of interface mtu read failure.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
uint32_t ra_reachabletime;
uint32_t ra_retranstime;
uint32_t ra_hoplimit;
- uint32_t ra_mtu;
+ int ra_mtu;
// DHCPv4
struct in_addr dhcpv4_start;
static uint64_t send_router_advert(struct interface *iface, const struct in6_addr *from)
{
time_t now = odhcpd_time();
- uint32_t mtu = iface->ra_mtu;
+ int mtu = iface->ra_mtu;
int hlim = iface->ra_hoplimit;
if (mtu == 0)
- mtu = odhcpd_get_interface_config(iface->ifname, "mtu");
+ mtu = odhcpd_get_interface_config(iface->ifname, "mtu");
if (mtu < 1280)
mtu = 1280;