summaryrefslogtreecommitdiffhomepage
path: root/proto-shell.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-10-13 15:03:29 +0200
committerFelix Fietkau <nbd@openwrt.org>2011-10-13 15:03:29 +0200
commit2ac630138173e111e16b9c544d9da53f3af97f2e (patch)
treeec0d26f24d9aae50c76f46cbb20e647e207a2533 /proto-shell.c
parent5e5cd11724f6cf86edc5796e6b805573c767f757 (diff)
proto-shell: add dns server support
Diffstat (limited to 'proto-shell.c')
-rw-r--r--proto-shell.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/proto-shell.c b/proto-shell.c
index 32a3016..3ed4b8e 100644
--- a/proto-shell.c
+++ b/proto-shell.c
@@ -303,6 +303,7 @@ enum {
NOTIFY_IP6ADDR,
NOTIFY_ROUTES,
NOTIFY_ROUTES6,
+ NOTIFY_DNS,
__NOTIFY_LAST
};
@@ -316,6 +317,7 @@ static const struct blobmsg_policy notify_attr[__NOTIFY_LAST] = {
[NOTIFY_IP6ADDR] = { .name = "ip6addr", .type = BLOBMSG_TYPE_ARRAY },
[NOTIFY_ROUTES] = { .name = "routes", .type = BLOBMSG_TYPE_ARRAY },
[NOTIFY_ROUTES6] = { .name = "routes6", .type = BLOBMSG_TYPE_ARRAY },
+ [NOTIFY_DNS] = { .name = "dns", .type = BLOBMSG_TYPE_ARRAY },
};
static int
@@ -359,6 +361,9 @@ proto_shell_update_link(struct proto_shell_state *state, struct blob_attr **tb)
if ((cur = tb[NOTIFY_ROUTES6]) != NULL)
proto_shell_parse_route_list(state->proto.iface, cur, true);
+ if ((cur = tb[NOTIFY_DNS]) != NULL)
+ interface_add_dns_server_list(state->proto.iface, cur);
+
return 0;
}