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.
This commit is contained in:
YAMAMOTO Takashi 2020-06-25 19:24:49 +09:00 committed by Xiang Xiao
parent 74d13d74b9
commit 05671fd8f1

View File

@ -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);
}
/****************************************************************************