Clarification regarding implementation of "bridge_linkcheck"

Hi all,

I would like to understand the rationale for existing implementation of
https://github.com/freebsd/freebsd-src/blob/main/sys/net/if_bridge.c#L4456

Assuming a bridge having N number of interfaces/ports, some of them have "IFCAP_LINKSTATE" capability, some do not.
If ALL of the ports, having capability above, are in link state different than "UP":
--> bridge's link state is set to DOWN, the non-capabable IFs are not considered.

However, now assuming a bridge having N number of interfaces/ports. ALL of them do not have "IFCAP_LINKSTATE" capability.
--> link state is defaulted to UP

I do not quite understand why bridge's link state is not set to UP "as long as one port does not support link state".

Any insights here?

Thanks a lot.
 
interfaces that do not support link-state cannot contribute meaningfully to a link-state determination. they are like SQL null values, in a sense. but if there aren't any supporting interfaces, the bridge would be useless if it didn't go up; that's a special case. conversely, with a mix of interfaces, the bridge can't assume anything about the status of the interfaces without link-state, so it obeys the ones with.
 
Back
Top