network/route-nexthop: fix route_nexthop_copy()

Follow-up for 413ea20ab3.
This commit is contained in:
Yu Watanabe
2024-01-19 19:20:21 +09:00
parent f14686c1d2
commit ed6a7148f4
+1 -1
View File
@@ -179,7 +179,7 @@ static int route_nexthop_copy(const RouteNextHop *src, RouteNextHop *dest) {
/* unset pointer copied in the above. */
dest->ifname = NULL;
return strdup_or_null(src->ifindex == 0 ? NULL : src->ifname, &dest->ifname);
return strdup_or_null(src->ifindex > 0 ? NULL : src->ifname, &dest->ifname);
}
int route_nexthops_copy(const Route *src, const RouteNextHop *nh, Route *dest) {