From 93e98f5f14dba6d4d5927f6474bf4525e81bb7f8 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Tue, 6 Feb 2018 08:35:09 +0000 Subject: [PATCH] [etherswitchcfg] print the switch MAC address if provided. --- sbin/etherswitchcfg/etherswitchcfg.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sbin/etherswitchcfg/etherswitchcfg.c b/sbin/etherswitchcfg/etherswitchcfg.c index e33c515c5595..ce01891a76da 100644 --- a/sbin/etherswitchcfg/etherswitchcfg.c +++ b/sbin/etherswitchcfg/etherswitchcfg.c @@ -556,6 +556,13 @@ print_config(struct cfg *cfg) printf("none\n"); } } + + /* Print switch MAC address. */ + if (cfg->conf.cmd & ETHERSWITCH_CONF_SWITCH_MACADDR) { + printf("%s: Switch MAC address: %s\n", + c, + ether_ntoa(&cfg->conf.switch_macaddr)); + } } static void