projects
/
oweals
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3567669
)
proto-shell: fix parsing route netmask
author
Felix Fietkau
<nbd@openwrt.org>
Fri, 14 Oct 2011 01:18:46 +0000
(
03:18
+0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Fri, 14 Oct 2011 01:18:46 +0000
(
03:18
+0200)
proto-shell.c
patch
|
blob
|
history
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 =
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;
}