diff options
author | Tobias Brunner <tobias@strongswan.org> | 2013-06-15 18:56:11 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2013-06-21 17:03:21 +0200 |
commit | 93e4df3761bc496a1bae71705f13f3f5a29288ed (patch) | |
tree | adba1b9f560dd3060c2439bb6828d4b29825b2e6 /src | |
parent | c8a56512a67076d5e5eb08166532e7081feec437 (diff) | |
download | strongswan-93e4df3761bc496a1bae71705f13f3f5a29288ed.tar.bz2 strongswan-93e4df3761bc496a1bae71705f13f3f5a29288ed.tar.xz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c b/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c index 520f52a6c..d6fd33a44 100644 --- a/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c +++ b/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c @@ -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; |