proto-shell: add dns search domains
[project/netifd.git] / proto-shell.c
index c90f65c..127a79d 100644 (file)
@@ -318,6 +318,7 @@ enum {
        NOTIFY_ROUTES,
        NOTIFY_ROUTES6,
        NOTIFY_DNS,
+       NOTIFY_DNS_SEARCH,
        __NOTIFY_LAST
 };
 
@@ -333,6 +334,7 @@ static const struct blobmsg_policy notify_attr[__NOTIFY_LAST] = {
        [NOTIFY_ROUTES] = { .name = "routes", .type = BLOBMSG_TYPE_ARRAY },
        [NOTIFY_ROUTES6] = { .name = "routes6", .type = BLOBMSG_TYPE_ARRAY },
        [NOTIFY_DNS] = { .name = "dns", .type = BLOBMSG_TYPE_ARRAY },
+       [NOTIFY_DNS_SEARCH] = { .name = "dns_search", .type = BLOBMSG_TYPE_ARRAY },
 };
 
 static int
@@ -381,6 +383,9 @@ proto_shell_update_link(struct proto_shell_state *state, struct blob_attr **tb)
        if ((cur = tb[NOTIFY_DNS]) != NULL)
                interface_add_dns_server_list(state->proto.iface, cur);
 
+       if ((cur = tb[NOTIFY_DNS_SEARCH]) != NULL)
+               interface_add_dns_search_list(state->proto.iface, cur);
+
        interface_ip_update_complete(state->proto.iface);
 
        state->proto.proto_event(&state->proto, IFPEV_UP);