From 935c0d26f7ca748e78a02f524908ede696dc4cda Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Mon, 8 Dec 2014 13:58:48 +0100 Subject: networkd: route - ignore unknown address family --- src/network/networkd-route.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c index 4e389db5ef..590dd49df9 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -353,6 +353,12 @@ int config_parse_destination(const char *unit, return 0; } + if (f != AF_INET && f != AF_INET6) { + log_syntax(unit, LOG_ERR, filename, line, EINVAL, + "Unknown address family, ignoring assignment: %s", address); + return 0; + } + /* prefixlen */ if (e) { r = safe_atou8(e + 1, &prefixlen); @@ -362,7 +368,7 @@ int config_parse_destination(const char *unit, return 0; } } else { - switch (n->family) { + switch (f) { case AF_INET: prefixlen = 32; break; -- cgit v1.2.3-54-g00ecf