diff options
author | Tom Gundersen <teg@jklm.no> | 2014-07-23 13:48:18 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-07-23 23:54:51 +0200 |
commit | b0e39c8284b5195850a58e4efcce2f059bdcc6ad (patch) | |
tree | e5f1183bec258450f9cd59ce1a8e255179467e0d /src/network/networkd-address.c | |
parent | 36d054aae0847df38687640909304dde1452b22d (diff) |
networkd: merge DNS and NTP entries when exporting
In the state files, do not distinguish where the various entries came from
(static or DHCP), but include them all in the same list.
Diffstat (limited to 'src/network/networkd-address.c')
-rw-r--r-- | src/network/networkd-address.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index 8c4ef9964b..551c1ea9bf 100644 --- a/src/network/networkd-address.c +++ b/src/network/networkd-address.c @@ -394,55 +394,6 @@ int address_configure(Address *address, Link *link, return 0; } -int config_parse_dns(const char *unit, - const char *filename, - unsigned line, - const char *section, - unsigned section_line, - const char *lvalue, - int ltype, - const char *rvalue, - void *data, - void *userdata) { - Network *network = userdata; - Address *tail; - _cleanup_address_free_ Address *n = NULL; - int r; - - assert(filename); - assert(section); - assert(lvalue); - assert(rvalue); - assert(network); - - r = address_new_dynamic(&n); - if (r < 0) - return r; - - r = net_parse_inaddr(rvalue, &n->family, &n->in_addr); - if (r < 0) { - log_syntax(unit, LOG_ERR, filename, line, EINVAL, - "DNS address is invalid, ignoring assignment: %s", rvalue); - return 0; - } - - if (streq(lvalue, "DNS")) { - LIST_FIND_TAIL(addresses, network->dns, tail); - LIST_INSERT_AFTER(addresses, network->dns, tail, n); - } else if (streq(lvalue, "NTP")) { - LIST_FIND_TAIL(addresses, network->ntp, tail); - LIST_INSERT_AFTER(addresses, network->ntp, tail, n); - } else { - log_syntax(unit, LOG_ERR, filename, line, EINVAL, - "Key is invalid, ignoring assignment: %s=%s", lvalue, rvalue); - return 0; - } - - n = NULL; - - return 0; -} - int config_parse_broadcast(const char *unit, const char *filename, unsigned line, |