diff --git a/src/nm-device-private.h b/src/nm-device-private.h index 4301155387..e6052f9fa5 100644 --- a/src/nm-device-private.h +++ b/src/nm-device-private.h @@ -65,7 +65,10 @@ void nm_device_activate_schedule_ip6_config_result (NMDevice *device, NMIP6Confi void nm_device_activate_schedule_ip6_config_timeout (NMDevice *device); gboolean nm_device_activate_ip4_state_in_conf (NMDevice *device); +gboolean nm_device_activate_ip4_state_in_wait (NMDevice *device); + gboolean nm_device_activate_ip6_state_in_conf (NMDevice *device); +gboolean nm_device_activate_ip6_state_in_wait (NMDevice *device); void nm_device_set_dhcp_timeout (NMDevice *device, guint32 timeout); void nm_device_set_dhcp_anycast_address (NMDevice *device, guint8 *addr); diff --git a/src/nm-device.c b/src/nm-device.c index 855ce6399f..f0bbdf85ba 100644 --- a/src/nm-device.c +++ b/src/nm-device.c @@ -3458,6 +3458,13 @@ nm_device_activate_ip4_state_in_conf (NMDevice *self) return NM_DEVICE_GET_PRIVATE (self)->ip4_state == IP_CONF; } +gboolean +nm_device_activate_ip4_state_in_wait (NMDevice *self) +{ + g_return_val_if_fail (self != NULL, FALSE); + return NM_DEVICE_GET_PRIVATE (self)->ip4_state == IP_WAIT; +} + static gboolean nm_device_activate_ip6_config_commit (gpointer user_data) { @@ -3550,6 +3557,13 @@ nm_device_activate_ip6_state_in_conf (NMDevice *self) return NM_DEVICE_GET_PRIVATE (self)->ip6_state == IP_CONF; } +gboolean +nm_device_activate_ip6_state_in_wait (NMDevice *self) +{ + g_return_val_if_fail (self != NULL, FALSE); + return NM_DEVICE_GET_PRIVATE (self)->ip6_state == IP_WAIT; +} + static void clear_act_request (NMDevice *self) { diff --git a/src/nm-netlink-monitor.c b/src/nm-netlink-monitor.c index 4d0b0c5948..111dffaa10 100644 --- a/src/nm-netlink-monitor.c +++ b/src/nm-netlink-monitor.c @@ -596,6 +596,24 @@ nm_netlink_monitor_request_ip6_info (NMNetlinkMonitor *self, GError **error) return TRUE; } +gboolean +nm_netlink_monitor_request_bridge_info (NMNetlinkMonitor *self, GError **error) +{ + NMNetlinkMonitorPrivate *priv; + + g_return_val_if_fail (self != NULL, FALSE); + g_return_val_if_fail (NM_IS_NETLINK_MONITOR (self), FALSE); + + priv = NM_NETLINK_MONITOR_GET_PRIVATE (self); + + /* FIXME: nl_rtgen_request() gets the return value screwed up with + * libnl-1.1; revisit this and return a proper error when we port to + * a later libnl. + */ + nl_rtgen_request (priv->nlh_event, RTM_GETLINK, AF_BRIDGE, NLM_F_DUMP); + + return TRUE; +} static gboolean deferred_emit_carrier_state (gpointer user_data) diff --git a/src/nm-netlink-monitor.h b/src/nm-netlink-monitor.h index 14e5c4e0e2..b9468fdc8c 100644 --- a/src/nm-netlink-monitor.h +++ b/src/nm-netlink-monitor.h @@ -81,6 +81,9 @@ void nm_netlink_monitor_unsubscribe (NMNetlinkMonitor *monitor gboolean nm_netlink_monitor_request_ip6_info (NMNetlinkMonitor *monitor, GError **error); +gboolean nm_netlink_monitor_request_bridge_info (NMNetlinkMonitor *monitor, + GError **error); + void nm_netlink_monitor_request_status (NMNetlinkMonitor *monitor); gboolean nm_netlink_monitor_get_flags_sync (NMNetlinkMonitor *monitor,