kernel-pfroute: Activate TUN device before setting address
On FreeBSD, for some reason, we don't learn the interface is up otherwise. Even though ifconfig lists it as up at the same time.
This commit is contained in:
1 parent
c8a56512a6
commit
93e4df3761
1 file changed
+1
-1
@@ -837,7 +837,7 @@ METHOD(kernel_net_t, add_ip, status_t,
|
||||
{
|
||||
prefix = vip->get_address(vip).len * 8;
|
||||
}
|
||||
if (!tun->set_address(tun, vip, prefix) || !tun->up(tun))
|
||||
if (!tun->up(tun) || !tun->set_address(tun, vip, prefix))
|
||||
{
|
||||
tun->destroy(tun);
|
||||
return FAILED;
|
||||
|
||||
Reference in new issue
Block a user