ra_useleasetime bool 0 Use configured leasetime as
limit for the preferred and
valid lifetime of a prefix
+ra_mtu integer 0 MTU to be advertised in
+ RA messages
ndproxy_routing bool 1 Learn routes from NDP
ndproxy_slave bool 0 NDProxy external slave
IFACE_ATTR_RA_MAXINTERVAL,
IFACE_ATTR_RA_LIFETIME,
IFACE_ATTR_RA_USELEASETIME,
+ IFACE_ATTR_RA_MTU,
IFACE_ATTR_PD_MANAGER,
IFACE_ATTR_PD_CER,
IFACE_ATTR_NDPROXY_ROUTING,
[IFACE_ATTR_RA_MAXINTERVAL] = { .name = "ra_maxinterval", .type = BLOBMSG_TYPE_INT32 },
[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_MTU] = { .name = "ra_mtu", .type = BLOBMSG_TYPE_INT32 },
[IFACE_ATTR_NDPROXY_ROUTING] = { .name = "ndproxy_routing", .type = BLOBMSG_TYPE_BOOL },
[IFACE_ATTR_NDPROXY_SLAVE] = { .name = "ndproxy_slave", .type = BLOBMSG_TYPE_BOOL },
};
if ((c = tb[IFACE_ATTR_RA_MANAGEMENT]))
iface->managed = blobmsg_get_u32(c);
+ if ((c = tb[IFACE_ATTR_RA_MTU])) {
+ iface->ra_mtu = blobmsg_get_u32(c);
+ if (iface->ra_mtu < 1280)
+ goto err;
+ }
+
if ((c = tb[IFACE_ATTR_RA_OFFLINK]))
iface->ra_not_onlink = blobmsg_get_bool(c);
static uint64_t send_router_advert(struct interface *iface, const struct in6_addr *from)
{
time_t now = odhcpd_time();
- int mtu = odhcpd_get_interface_config(iface->ifname, "mtu");
+ uint32_t mtu = iface->ra_mtu;
int hlim = odhcpd_get_interface_config(iface->ifname, "hop_limit");
+ if (mtu == 0)
+ mtu = odhcpd_get_interface_config(iface->ifname, "mtu");
+
if (mtu < 1280)
mtu = 1280;