Skip to content

Commit 30eab38

Browse files
committed
network/route: use our definitions of route preference
Including linux/icmpv6.h easily trigger conflicts when another header includes netinet/icmp6.h. Let's drop the dependency and use our definition of the same values.
1 parent 68ee2ba commit 30eab38

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/network/networkd-route.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/* SPDX-License-Identifier: LGPL-2.1-or-later */
22

3-
#include <linux/icmpv6.h>
43
#include <linux/ipv6_route.h>
54
#include <linux/nexthop.h>
65

@@ -1810,11 +1809,11 @@ int config_parse_ipv6_route_preference(
18101809
}
18111810

18121811
if (streq(rvalue, "low"))
1813-
route->pref = ICMPV6_ROUTER_PREF_LOW;
1812+
route->pref = SD_NDISC_PREFERENCE_LOW;
18141813
else if (streq(rvalue, "medium"))
1815-
route->pref = ICMPV6_ROUTER_PREF_MEDIUM;
1814+
route->pref = SD_NDISC_PREFERENCE_MEDIUM;
18161815
else if (streq(rvalue, "high"))
1817-
route->pref = ICMPV6_ROUTER_PREF_HIGH;
1816+
route->pref = SD_NDISC_PREFERENCE_HIGH;
18181817
else {
18191818
log_syntax(unit, LOG_WARNING, filename, line, 0, "Unknown route preference: %s", rvalue);
18201819
return 0;

0 commit comments

Comments
 (0)