From 206958f8b6eb0a4e65749f481d8e17d552391c2f Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 14 Oct 2011 03:18:46 +0200 Subject: [PATCH] proto-shell: fix parsing route netmask --- proto-shell.c | 4 ++-- 1 file 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; } -- 2.30.2