From 2dfdcd4c6a2381bedb6e1b10ff0fdc4246802c82 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 24 May 2012 20:42:12 +0200 Subject: [PATCH] bridge: keep existing mac address if specified in the config --- bridge.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.25.1