From 05671fd8f1afc15fd3055f35884c25faab8697ab Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Thu, 25 Jun 2020 19:24:49 +0900 Subject: [PATCH] vpnkit: set mac address when available up_vpnkit network driver gets its mac address from the vpnkit. it isn't available until a successful negotiation with the vpnkit. --- arch/sim/src/sim/up_vpnkit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sim/src/sim/up_vpnkit.c b/arch/sim/src/sim/up_vpnkit.c index 13e0d293c7..df551f42fc 100644 --- a/arch/sim/src/sim/up_vpnkit.c +++ b/arch/sim/src/sim/up_vpnkit.c @@ -111,6 +111,7 @@ static int vpnkit_connect(void) INFO("Successfully negotiated with vpnkit"); g_vpnkit_fd = fd; g_connect_warned = false; + netdriver_setmacaddr(g_vifinfo.mac); return 0; } @@ -138,7 +139,6 @@ static void vpnkit_disconnect(void) void vpnkit_init(void) { vpnkit_connect(); - netdriver_setmacaddr(g_vifinfo.mac); } /****************************************************************************