platform: consider RTNH_F_ONLINK onlink flag for IPv4 routes
The "onlink" flag for IPv4 routes is part of the route ID. Consider it in nm_platform_ip4_route_cmp(). Also, allow configuring the flag when adding a route. Note that for IPv6, the onlink flag is still ignored. Pretty much like kernel does.
This commit is contained in:
@@ -2690,7 +2690,9 @@ _nl_msg_new_route (int nlmsg_type,
|
||||
? nm_platform_route_scope_inv (obj->ip4_route.scope_inv)
|
||||
: RT_SCOPE_NOWHERE,
|
||||
.rtm_type = RTN_UNICAST,
|
||||
.rtm_flags = 0,
|
||||
.rtm_flags = obj->ip_route.r_rtm_flags & (is_v4
|
||||
? (unsigned) (RTNH_F_ONLINK)
|
||||
: (unsigned) 0),
|
||||
.rtm_dst_len = obj->ip_route.plen,
|
||||
.rtm_src_len = is_v4
|
||||
? 0
|
||||
|
Reference in New Issue
Block a user