ROUTE_VALID,
ROUTE_TABLE,
ROUTE_SOURCE,
+ ROUTE_ONLINK,
__ROUTE_MAX
};
[ROUTE_TABLE] = { .name = "table", .type = BLOBMSG_TYPE_STRING },
[ROUTE_VALID] = { .name = "valid", .type = BLOBMSG_TYPE_INT32 },
[ROUTE_SOURCE] = { .name = "source", .type = BLOBMSG_TYPE_STRING },
+ [ROUTE_ONLINK] = { .name = "onlink", .type = BLOBMSG_TYPE_BOOL },
};
const struct uci_blob_param_list route_attr_list = {
route->sourcemask = (mask) ? atoi(mask) : ((af == AF_INET6) ? 128 : 32);
}
+ if ((cur = tb[ROUTE_ONLINK]) != NULL && blobmsg_get_bool(cur))
+ route->flags |= DEVROUTE_ONLINK;
+
if (is_proto_route) {
route->table = (v6) ? iface->ip6table : iface->ip4table;
route->flags |= DEVROUTE_SRCTABLE;
/* route resides in default source-route table */
DEVROUTE_SRCTABLE = (1 << 8),
+
+ /* route is on-link */
+ DEVROUTE_ONLINK = (1 << 9),
};
union if_addr {
.rtm_protocol = (route->flags & DEVADDR_KERNEL) ? RTPROT_KERNEL : RTPROT_STATIC,
.rtm_scope = scope,
.rtm_type = (cmd == RTM_DELROUTE) ? 0: RTN_UNICAST,
+ .rtm_flags = (route->flags & DEVROUTE_ONLINK) ? RTNH_F_ONLINK : 0,
};
struct nl_msg *msg;