Subject: Re: [PATCH 1/2] bridge: leave carrier on for empty bridge

From: Nicolas de Pesloüan<[email-masked]>
Date: Sat, 03 Sep 2011 20:32:28 +0200

Le 03/09/2011 00:11, Stephen Hemminger a écrit :
> On Fri, 02 Sep 2011 23:39:03 +0200
> Nicolas de Pesloüan<[email-masked]>  wrote:
>
>> Le 02/09/2011 19:22, Stephen Hemminger a écrit :
>>> This resolves a regression seen by some users of bridging.
>>> Some users use the bridge like a dummy device.
>>> They expect to be able to put an IPv6 address on the device
>>> with no ports attached during boot.
>>>
>>> Note: the bridge still will reflect the state of ports in the
>>> bridge if there are any added.
>>
>> Doesn't this jeopardize the behavior introduced in 1faa4356a3bd89ea11fb92752d897cff3a20ec0e
>> "bridge: control carrier based on ports online"?
>>
>> If the user starts the DHCP client before adding the first port to the bridge, the DHCP client will
>> have a carrier and start the autoconfiguration process. This was the old behavior, but you fixed it.
>>
>> 	Nicolas.
>>
>
> There is no perfect solution.
> If DHCP works then IPv6 breaks?

Instead of asserting carrier when the bridge have no port, can't we assert carrier when the three 
following condition are true at the same time :

- The bridge have no port.
- At least one IP address is setup on the bridge.
- The two above conditions are true for more than a configurable amount of seconds, with a default 
of 10, for example.

This would only delay carrier on for a few seconds for the regression and keep the current behavior 
(carrier off until at least 1 port is on) for DHCP.

	Nicolas.