From: Felix Fietkau Date: Thu, 24 May 2012 18:42:12 +0000 (+0200) Subject: bridge: keep existing mac address if specified in the config X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2dfdcd4c6a2381bedb6e1b10ff0fdc4246802c82;p=oweals%2Fnetifd.git bridge: keep existing mac address if specified in the config --- diff --git a/bridge.c b/bridge.c index 1725162..361b409 100644 --- a/bridge.c +++ b/bridge.c @@ -102,7 +102,12 @@ bridge_reset_primary(struct bridge_state *bst) { struct bridge_member *bm; + if (!bst->primary_port && + (bst->dev.settings.flags & DEV_OPT_MACADDR)) + return; + bst->primary_port = NULL; + bst->dev.settings.flags &= ~DEV_OPT_MACADDR; vlist_for_each_element(&bst->members, bm, node) { if (!bm->present) continue;