IFACE_ATTR_RA_LIFETIME,
IFACE_ATTR_RA_USELEASETIME,
IFACE_ATTR_RA_REACHABLETIME,
+ IFACE_ATTR_RA_RETRANSTIME,
IFACE_ATTR_RA_HOPLIMIT,
IFACE_ATTR_RA_MTU,
IFACE_ATTR_PD_MANAGER,
[IFACE_ATTR_RA_LIFETIME] = { .name = "ra_lifetime", .type = BLOBMSG_TYPE_INT32 },
[IFACE_ATTR_RA_USELEASETIME] = { .name = "ra_useleasetime", .type = BLOBMSG_TYPE_BOOL },
[IFACE_ATTR_RA_REACHABLETIME] = { .name = "ra_reachabletime", .type = BLOBMSG_TYPE_INT32 },
+ [IFACE_ATTR_RA_RETRANSTIME] = { .name = "ra_retranstime", .type = BLOBMSG_TYPE_INT32 },
[IFACE_ATTR_RA_HOPLIMIT] = { .name = "ra_hoplimit", .type = BLOBMSG_TYPE_INT32 },
[IFACE_ATTR_RA_MTU] = { .name = "ra_mtu", .type = BLOBMSG_TYPE_INT32 },
[IFACE_ATTR_NDPROXY_ROUTING] = { .name = "ndproxy_routing", .type = BLOBMSG_TYPE_BOOL },
iface->managed = blobmsg_get_u32(c);
if ((c = tb[IFACE_ATTR_RA_REACHABLETIME])) {
- iface->ra_reachabletime = blobmsg_get_u32(c);
- if (iface->ra_reachabletime > 3600000)
+ uint32_t ra_reachabletime = blobmsg_get_u32(c);
+ if (ra_reachabletime > 3600000)
+ goto err;
+
+ iface->ra_reachabletime = ra_reachabletime;
+ }
+
+ if ((c = tb[IFACE_ATTR_RA_RETRANSTIME])) {
+ iface->ra_retranstime = blobmsg_get_u32(c);
+ if (iface->ra_retranstime > 60000)
goto err;
}
}
if ((c = tb[IFACE_ATTR_RA_MTU])) {
- iface->ra_mtu = blobmsg_get_u32(c);
- if (iface->ra_mtu < 1280)
+ uint32_t ra_mtu = blobmsg_get_u32(c);
+ if (ra_mtu < 1280 || ra_mtu > 65535)
goto err;
+
+ iface->ra_mtu = ra_mtu;
}
if ((c = tb[IFACE_ATTR_RA_OFFLINK]))