summaryrefslogtreecommitdiff
path: root/proto-shell.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-10-14 00:30:54 +0200
committerFelix Fietkau <nbd@openwrt.org>2011-10-14 00:30:54 +0200
commitc000b546d97aa97144ee2cdf396d46a039bb7f98 (patch)
tree90668d89cd3d96c041f9a117fc4c10d492125338 /proto-shell.c
parentb021a49efe0641f7c5ca763bc43e5ba73b7a1b5f (diff)
downloadnetifd-c000b546d97aa97144ee2cdf396d46a039bb7f98.tar.gz
proto-shell: allow passing netmask in ip address format
Diffstat (limited to 'proto-shell.c')
-rw-r--r--proto-shell.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/proto-shell.c b/proto-shell.c
index f5a5fb1..c90f65c 100644
--- a/proto-shell.c
+++ b/proto-shell.c
@@ -236,7 +236,7 @@ enum {
static const struct blobmsg_policy route_attr[__ROUTE_LAST] = {
[ROUTE_TARGET] = { .name = "target", .type = BLOBMSG_TYPE_STRING },
- [ROUTE_MASK] = { .name = "mask", .type = BLOBMSG_TYPE_INT32 },
+ [ROUTE_MASK] = { .name = "mask", .type = BLOBMSG_TYPE_STRING },
[ROUTE_GATEWAY] = { .name = "gateway", .type = BLOBMSG_TYPE_STRING },
[ROUTE_DEVICE] = { .name = "device", .type = BLOBMSG_TYPE_STRING },
};
@@ -352,7 +352,7 @@ proto_shell_update_link(struct proto_shell_state *state, struct blob_attr **tb)
}
if (!tb[NOTIFY_IFNAME]) {
- if (!state->iface->main_dev.dev)
+ if (!state->proto.iface->main_dev.dev)
return UBUS_STATUS_INVALID_ARGUMENT;
} else if (!state->l3_dev.dev) {
device_add_user(&state->l3_dev,