diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-10-14 03:18:46 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-10-14 03:18:46 +0200 |
commit | 206958f8b6eb0a4e65749f481d8e17d552391c2f (patch) | |
tree | 549c619ef323c1b94f7a3c08652288738414a39c | |
parent | 356766954c25bd47732c8a979a5d073769117e5a (diff) |
proto-shell: fix parsing route netmask
-rw-r--r-- | proto-shell.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/proto-shell.c b/proto-shell.c index e554d79..bc74de9 100644 --- a/proto-shell.c +++ b/proto-shell.c @@ -265,8 +265,8 @@ parse_route(struct interface *iface, struct blob_attr *attr, bool v6) route->mask = v6 ? 128 : 32; if ((cur = tb[ROUTE_MASK]) != NULL) { - route->mask = blobmsg_get_u32(cur); - if (route->mask > v6 ? 128 : 32) + route->mask = parse_netmask_string(blobmsg_data(cur), v6); + if (route->mask > (v6 ? 128 : 32)) goto error; } |