if ((cur = tb[ROUTE_MTU]) != NULL)
route->mtu = blobmsg_get_u32(cur);
- vlist_add(&ip->route, &route->node, &route->mask);
+ vlist_add(&ip->route, &route->node, &route->flags);
return;
error:
addr_cmp(const void *k1, const void *k2, void *ptr)
{
return memcmp(k1, k2, sizeof(struct device_addr) -
- offsetof(struct device_addr, mask));
+ offsetof(struct device_addr, flags));
}
static int
route_cmp(const void *k1, const void *k2, void *ptr)
{
return memcmp(k1, k2, sizeof(struct device_route) -
- offsetof(struct device_route, mask));
+ offsetof(struct device_route, flags));
}
static void
struct device_addr {
struct vlist_node node;
-
- enum device_addr_flags flags;
bool enabled;
/* ipv4 only */
uint32_t broadcast;
/* must be last */
+ enum device_addr_flags flags;
unsigned int mask;
union if_addr addr;
};
struct device_route {
struct vlist_node node;
- enum device_addr_flags flags;
bool enabled;
bool keep;
int mtu;
/* must be last */
+ enum device_addr_flags flags;
unsigned int mask;
union if_addr addr;
};
if (ext)
addr->flags |= DEVADDR_EXTERNAL;
- vlist_add(&iface->proto_ip.addr, &addr->node, &addr->mask);
+ vlist_add(&iface->proto_ip.addr, &addr->node, &addr->flags);
return true;
}
route->mask = 0;
route->flags = (v6 ? DEVADDR_INET6 : DEVADDR_INET4);
- vlist_add(&iface->proto_ip.route, &route->node, &route->mask);
+ vlist_add(&iface->proto_ip.route, &route->node, &route->flags);
return true;
}