summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-route-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/networkd-route-util.c')
-rw-r--r--src/network/networkd-route-util.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/network/networkd-route-util.c b/src/network/networkd-route-util.c
index 8d63b9b058..9bb1e0f707 100644
--- a/src/network/networkd-route-util.c
+++ b/src/network/networkd-route-util.c
@@ -39,10 +39,12 @@ unsigned routes_max(void) {
return cached;
}
-bool route_type_is_reject(const Route *route) {
- assert(route);
+bool route_type_is_reject(uint8_t type) {
+ return IN_SET(type, RTN_UNREACHABLE, RTN_PROHIBIT, RTN_BLACKHOLE, RTN_THROW);
+}
- return IN_SET(route->type, RTN_UNREACHABLE, RTN_PROHIBIT, RTN_BLACKHOLE, RTN_THROW);
+bool route_is_reject(const Route *route) {
+ return route_type_is_reject(ASSERT_PTR(route)->type);
}
static bool route_lifetime_is_valid(const Route *route) {