platform: don't require cloned flag for RTM_GETROUTE IPv6 result
IPv4 routes that are a response to RTM_GETROUTE must have the cloned flag while IPv6 routes don't have to. Don't check the flag for IPv6 routes and add a test case to verify that RTM_GETROUTE works for IPv6. https://bugzilla.gnome.org/show_bug.cgi?id=793962
This commit is contained in:
@@ -4327,10 +4327,13 @@ event_valid_msg (NMPlatform *platform, struct nl_msg *msg, gboolean handle_event
|
||||
nm_auto_nmpobj const NMPObject *obj_replace = NULL;
|
||||
gboolean resync_required = FALSE;
|
||||
gboolean only_dirty = FALSE;
|
||||
gboolean is_ipv6;
|
||||
|
||||
if (NM_FLAGS_HAS (obj->ip_route.r_rtm_flags, RTM_F_CLONED)) {
|
||||
/* a cloned route might be a response for RTM_GETROUTE. Check, whether it is. */
|
||||
nm_assert (!nmp_object_is_alive (obj));
|
||||
/* IPv4 routes that are a response to RTM_GETROUTE must have
|
||||
* the cloned flag while IPv6 routes don't have to. */
|
||||
is_ipv6 = NMP_OBJECT_GET_TYPE (obj) == NMP_OBJECT_TYPE_IP6_ROUTE;
|
||||
if (is_ipv6 || NM_FLAGS_HAS (obj->ip_route.r_rtm_flags, RTM_F_CLONED)) {
|
||||
nm_assert (is_ipv6 || !nmp_object_is_alive (obj));
|
||||
priv = NM_LINUX_PLATFORM_GET_PRIVATE (platform);
|
||||
if (NM_FLAGS_HAS (priv->delayed_action.flags, DELAYED_ACTION_TYPE_WAIT_FOR_NL_RESPONSE)) {
|
||||
guint i;
|
||||
|
Reference in New Issue
Block a user