From c000b546d97aa97144ee2cdf396d46a039bb7f98 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 14 Oct 2011 00:30:54 +0200 Subject: proto-shell: allow passing netmask in ip address format --- proto-shell.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'proto-shell.c') 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, -- cgit v1.2.1