From: Felix Fietkau Date: Fri, 14 Oct 2011 01:18:46 +0000 (+0200) Subject: proto-shell: fix parsing route netmask X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=206958f8b6eb0a4e65749f481d8e17d552391c2f;p=oweals%2Fnetifd.git proto-shell: fix parsing route netmask --- 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; }