summaryrefslogtreecommitdiffhomepage
path: root/proto-shell.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-05-19 23:21:54 +0200
committerFelix Fietkau <nbd@openwrt.org>2012-05-19 23:21:54 +0200
commitb0b11b2295fbb8399949139d82156e123e005902 (patch)
tree1360c16987ee1afba702a99c07366e6b845d3e69 /proto-shell.c
parent69c5043fdcea724f59055630eb0cf593c41732cb (diff)
move dns server/search list parsing to interface core to support peerdns=0 + static entries
Diffstat (limited to 'proto-shell.c')
-rw-r--r--proto-shell.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/proto-shell.c b/proto-shell.c
index 5309a55..2317209 100644
--- a/proto-shell.c
+++ b/proto-shell.c
@@ -381,6 +381,8 @@ enum {
NOTIFY_DATA,
NOTIFY_KEEP,
NOTIFY_HOST,
+ NOTIFY_DNS,
+ NOTIFY_DNS_SEARCH,
__NOTIFY_LAST
};
@@ -400,6 +402,8 @@ static const struct blobmsg_policy notify_attr[__NOTIFY_LAST] = {
[NOTIFY_DATA] = { .name = "data", .type = BLOBMSG_TYPE_TABLE },
[NOTIFY_KEEP] = { .name = "keep", .type = BLOBMSG_TYPE_BOOL },
[NOTIFY_HOST] = { .name = "host", .type = BLOBMSG_TYPE_STRING },
+ [NOTIFY_DNS] = { .name = "dns", .type = BLOBMSG_TYPE_ARRAY },
+ [NOTIFY_DNS_SEARCH] = { .name = "dns_search", .type = BLOBMSG_TYPE_ARRAY },
};
static int
@@ -464,6 +468,12 @@ proto_shell_update_link(struct proto_shell_state *state, struct blob_attr *data,
if ((cur = tb[NOTIFY_ROUTES6]) != NULL)
proto_shell_parse_route_list(state->proto.iface, cur, true);
+ if ((cur = tb[NOTIFY_DNS]))
+ interface_add_dns_server_list(&iface->proto_ip, cur);
+
+ if ((cur = tb[NOTIFY_DNS_SEARCH]))
+ interface_add_dns_search_list(&iface->proto_ip, cur);
+
interface_update_complete(state->proto.iface);
if (!keep)