projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
proto-shell: fix parsing route netmask
[project/netifd.git]
/
proto-shell.c
diff --git
a/proto-shell.c
b/proto-shell.c
index e554d796891e0bb4376e3b0fc1deb6a27ca57d46..bc74de9a51eab2a2fb8c112155968eec593bddf5 100644
(file)
--- 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 = 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;
}
goto error;
}