Enabling and Disabling a Bridge Device
We saw in the
section "Bridge Device Setup Routine"
how dev->open and dev->stop are initialized for bridge devices, and we saw in the section
"Enabling and Disabling a Network
Device" in Chapter 8 how administrative
commands to enable and disable a network device are processed by dev_open and dev_close.
br_dev_open enables a bridge by:
Initializing the bridge device features to the minimal, common subset of the features supported by its enslaved devices with
br_features_recomputeEnabling the device for transmission with
netif_start_queue(see the section "Enabling and Disabling Transmissions" in Chapter 11)Enabling the bridge device with
br_stp_enable_bridge
When you enable a bridge device, any port that had previously been enslaved to it would also be enabled.
br_dev_stop is just the mirror image of br_dev_open, as shown in Figure 16-9.

Figure 16-9. (a) Enabling a bridge; (b) disabling a bridge
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access