After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 683205 - slave devices (bond slaves, bridge slaves) should not perform IP configuration
slave devices (bond slaves, bridge slaves) should not perform IP configuration
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Pavel Simerda
NetworkManager maintainer(s)
Depends on:
Blocks: 540995 546197
 
 
Reported: 2012-09-02 13:56 UTC by Pavel Simerda
Modified: 2013-03-07 12:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pavel Simerda 2012-09-02 13:56:25 UTC
Bonding and bridging (to be merged) slave devices should never perform IP configuration. It is performed by the master interface.
Comment 1 Pavel Simerda 2012-09-03 01:20:26 UTC
Patch available in 'pavlix/next' branch.
Comment 2 Dan Williams 2013-03-06 20:51:20 UTC
Ok, this is handled slightly differently in git master.

Slave devices start activating, do their L2 config, and then enter the IP_CONFIG state where they stop until the master is ready to enslave them, because the master may be start up too and may require some time to do any initial configuration.

Once the master hits stage2/CONFIG it proceeds to enslave any slave waiting in IP_CONFIG state.

This notifies the slave that it is successfully enslaved, and the slave then jumps to SECONDARIES without doing any actual IP configuration.

If the slave finishes with it's L2 config after the master is ready, then the master gets the signal that the slave has finished (and thus entered IP_CONFIG) in slave_state_changed(), where it then enslaves the slave and the slave jumps directly to SECONDARIES.

While slaves do enter the IP_CONFIG state, they don't do any IP configuration because they simply wait to be enslaved.  That is handled by nm_device_activate_stage3_ip_config_start():

	/* If the device is a slave, then we don't do any IP configuration but we
	 * use the IP config stage to indicate to the master we're ready for
	 * enslavement.  Either the master has already enslaved us, in which case
	 * our state transition to SECONDARIES is already queued courtesy of
	 * nm_device_slave_notify_enslaved(), or the master is still activating,
	 * in which case we postpone activation here until the master enslaves us,
	 * which calls nm_device_slave_notify_enslaved().
	 */
	master = nm_active_connection_get_master (NM_ACTIVE_CONNECTION (priv->act_request));
	if (master) {
		if (priv->enslaved == FALSE) {
			nm_log_info (LOGD_DEVICE, "Activation (%s) connection '%s' waiting on master '%s'",
						 nm_device_get_iface (self),
						 nm_connection_get_id (nm_device_get_connection (self)),
						 nm_device_get_iface (master));
		}
		goto out;
	}
Comment 3 Dan Williams 2013-03-06 20:53:23 UTC
Basically, the patch in pavlix/masterslave makes the slave jump directly from stage2/CONFIG to ACTIVATED, which means there's no state where the master can detect that the interface is waiting to be enslaved.  Plus, the slave isn't really "activated" until it's been enslaved, which I think this patch prevents.
Comment 4 Dan Williams 2013-03-06 20:59:05 UTC
So basically, I don't think  "bridging/bonding: disable slave IP configuration (bgo #683205)" is no longer required and can be dropped.
Comment 5 Pavel Simerda 2013-03-07 12:04:39 UTC
The bug report predated the large bridging/bonding patchset.