summaryrefslogtreecommitdiff
path: root/proto.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-02-26 17:20:00 +0100
committerFelix Fietkau <nbd@openwrt.org>2012-02-26 17:20:00 +0100
commitf5ca090c260a74fd3576f79ffb8799e8c20e3878 (patch)
treed43de1cbea63ac7a4c2e1857480f2ffa8197c200 /proto.c
parentf365db4c75b7e824eb785be487b0afc18a45ef7f (diff)
downloadnetifd-f5ca090c260a74fd3576f79ffb8799e8c20e3878.tar.gz
proto: move the dns search option handling to the core
Diffstat (limited to 'proto.c')
-rw-r--r--proto.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/proto.c b/proto.c
index ce56a66..29dd429 100644
--- a/proto.c
+++ b/proto.c
@@ -19,6 +19,7 @@ enum {
OPT_GATEWAY,
OPT_IP6GW,
OPT_DNS,
+ OPT_DNS_SEARCH,
__OPT_MAX,
};
@@ -29,6 +30,7 @@ static const struct blobmsg_policy proto_ip_attributes[__OPT_MAX] = {
[OPT_GATEWAY] = { .name = "gateway", .type = BLOBMSG_TYPE_STRING },
[OPT_IP6GW] = { .name = "ip6gw", .type = BLOBMSG_TYPE_STRING },
[OPT_DNS] = { .name = "dns", .type = BLOBMSG_TYPE_ARRAY },
+ [OPT_DNS_SEARCH] = { .name = "dns_search", .type = BLOBMSG_TYPE_ARRAY },
};
static const union config_param_info proto_ip_attr_info[__OPT_MAX] = {
@@ -224,6 +226,9 @@ proto_apply_ip_settings(struct interface *iface, struct blob_attr *attr, bool ex
if (tb[OPT_DNS])
interface_add_dns_server_list(&iface->proto_ip, tb[OPT_DNS]);
+ if (tb[OPT_DNS_SEARCH])
+ interface_add_dns_search_list(&iface->proto_ip, tb[OPT_DNS_SEARCH]);
+
return 0;
error: