diff options
author | Daniel Mack <daniel@zonque.org> | 2015-07-29 20:31:15 +0200 |
---|---|---|
committer | Daniel Mack <daniel@zonque.org> | 2015-07-29 20:31:15 +0200 |
commit | c2570b3de2430b06f545e78ff32b97503f81f09f (patch) | |
tree | 9f58e23600a681723f393f71bb19d10f23df5050 /src/network/networkd-netdev-tunnel.c | |
parent | 7fc309b3a83c6f8a6f06b9bbea0c5ea379cef68e (diff) | |
parent | 8110e144ff5c3a95a2ac82691ee11528b4e6642a (diff) |
Merge branch 'master' of github.com:systemd/systemd
Diffstat (limited to 'src/network/networkd-netdev-tunnel.c')
-rw-r--r-- | src/network/networkd-netdev-tunnel.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/network/networkd-netdev-tunnel.c b/src/network/networkd-netdev-tunnel.c index 7fd9ef584b..265e67b7e3 100644 --- a/src/network/networkd-netdev-tunnel.c +++ b/src/network/networkd-netdev-tunnel.c @@ -404,12 +404,6 @@ int config_parse_tunnel_address(const char *unit, return 0; } -static const char* const ipv6_flowlabel_table[_NETDEV_IPV6_FLOWLABEL_MAX] = { - [NETDEV_IPV6_FLOWLABEL_INHERIT] = "inherit", -}; - -DEFINE_STRING_TABLE_LOOKUP(ipv6_flowlabel, IPv6FlowLabel); - int config_parse_ipv6_flowlabel(const char* unit, const char *filename, unsigned line, @@ -422,7 +416,6 @@ int config_parse_ipv6_flowlabel(const char* unit, void *userdata) { IPv6FlowLabel *ipv6_flowlabel = data; Tunnel *t = userdata; - IPv6FlowLabel s; int k = 0; int r; @@ -431,12 +424,11 @@ int config_parse_ipv6_flowlabel(const char* unit, assert(rvalue); assert(ipv6_flowlabel); - s = ipv6_flowlabel_from_string(rvalue); - if (s != _NETDEV_IPV6_FLOWLABEL_INVALID) { + if (streq(rvalue, "inherit")) { *ipv6_flowlabel = IP6_FLOWINFO_FLOWLABEL; t->flags |= IP6_TNL_F_USE_ORIG_FLOWLABEL; } else { - r = config_parse_unsigned(unit, filename, line, section, section_line, lvalue, ltype, rvalue, &k, userdata); + r = config_parse_int(unit, filename, line, section, section_line, lvalue, ltype, rvalue, &k, userdata); if (r >= 0) { if (k > 0xFFFFF) log_syntax(unit, LOG_ERR, filename, line, k, "Failed to parse IPv6 flowlabel option, ignoring: %s", rvalue); |