diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-03-04 00:02:38 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-03-04 00:02:38 +0100 |
commit | c6e1778d4429032087b36fb0dde2ae2fecf53b4a (patch) | |
tree | 04e0f830cf5bfc8f4c3a4b72d62bd126e45d2f69 /interface-ip.c | |
parent | 9fe20c8cbc4249c13d6f305adc91f4bc695f7c23 (diff) |
simplify vlist, move avl key handling to vlist_add()
Diffstat (limited to 'interface-ip.c')
-rw-r--r-- | interface-ip.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/interface-ip.c b/interface-ip.c index 7f10120..612fd5f 100644 --- a/interface-ip.c +++ b/interface-ip.c @@ -95,7 +95,7 @@ interface_ip_add_route(struct interface *iface, struct blob_attr *attr, bool v6) if ((cur = tb[ROUTE_MTU]) != NULL) route->mtu = blobmsg_get_u32(cur); - vlist_add(&ip->route, &route->node); + vlist_add(&ip->route, &route->node, &route->mask); return; error: @@ -420,8 +420,6 @@ interface_ip_init(struct interface_ip_settings *ip, struct interface *iface) ip->enabled = true; vlist_simple_init(&ip->dns_search, struct dns_search_domain, node); vlist_simple_init(&ip->dns_servers, struct dns_server, node); - vlist_init(&ip->route, route_cmp, interface_update_proto_route, - struct device_route, node, mask); - vlist_init(&ip->addr, addr_cmp, interface_update_proto_addr, - struct device_addr, node, mask); + vlist_init(&ip->route, route_cmp, interface_update_proto_route); + vlist_init(&ip->addr, addr_cmp, interface_update_proto_addr); } |