summaryrefslogtreecommitdiffhomepage
path: root/proto.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-03-04 00:02:38 +0100
committerFelix Fietkau <nbd@openwrt.org>2012-03-04 00:02:38 +0100
commitc6e1778d4429032087b36fb0dde2ae2fecf53b4a (patch)
tree04e0f830cf5bfc8f4c3a4b72d62bd126e45d2f69 /proto.c
parent9fe20c8cbc4249c13d6f305adc91f4bc695f7c23 (diff)
simplify vlist, move avl key handling to vlist_add()
Diffstat (limited to 'proto.c')
-rw-r--r--proto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/proto.c b/proto.c
index 1747658..56870b1 100644
--- a/proto.c
+++ b/proto.c
@@ -142,7 +142,7 @@ parse_addr(struct interface *iface, const char *str, bool v6, int mask,
if (ext)
addr->flags |= DEVADDR_EXTERNAL;
- vlist_add(&iface->proto_ip.addr, &addr->node);
+ vlist_add(&iface->proto_ip.addr, &addr->node, &addr->mask);
return true;
}
@@ -184,7 +184,7 @@ parse_gateway_option(struct interface *iface, struct blob_attr *attr, bool v6)
route->mask = 0;
route->flags = DEVADDR_DEVICE | (v6 ? DEVADDR_INET6 : DEVADDR_INET4);
- vlist_add(&iface->proto_ip.route, &route->node);
+ vlist_add(&iface->proto_ip.route, &route->node, &route->mask);
return true;
}