diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c index e5ddd7782e1..5a04e9dcf6e 100644 --- a/sys/net/route/route_ctl.c +++ b/sys/net/route/route_ctl.c @@ -821,7 +821,7 @@ add_route_flags(struct rib_head *rnh, struct rtentry *rt, struct route_nhop_data /* Now either append or replace */ if (op_flags & RTM_F_REPLACE) { - if (nhop_get_prio(rnd_orig.rnd_nhop) > nhop_get_prio(rnd_add->rnd_nhop)) { + if (nhop_get_prio(rnd_orig.rnd_nhop) == NH_PRIORITY_HIGH) { /* Old path is "better" (e.g. has PINNED flag set) */ RIB_WUNLOCK(rnh); error = EEXIST;