mirror of
https://github.com/OpenVPN/openvpn.git
synced 2024-09-20 12:02:28 +02:00
Fixed compile issues on FreeBSD and Solaris
In commit 7fb0e07ec3
struct route changed and
this change was not fixed in all places in tun.c, which caused
a compilation error. A few whitespace fixes is added as well.
OSX needs to be fixed as well, but this will be done in a separate patch.
Tested-by: Eric F Crist <ecrist@secure-computing.net> (FreeBSD)
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
This commit is contained in:
parent
c21b73f251
commit
79a5aa44ca
17
tun.c
17
tun.c
@ -865,13 +865,12 @@ do_ifconfig (struct tuntap *tt,
|
||||
/* Add a network route for the local tun interface */
|
||||
struct route r;
|
||||
CLEAR (r);
|
||||
r.defined = true;
|
||||
r.flags = RT_DEFINED | RT_METRIC_DEFINED;
|
||||
r.network = tt->local & tt->remote_netmask;
|
||||
r.netmask = tt->remote_netmask;
|
||||
r.gateway = tt->local;
|
||||
r.metric_defined = true;
|
||||
r.metric = 0;
|
||||
add_route (&r, tt, 0, es);
|
||||
add_route (&r, tt, 0, NULL, es);
|
||||
}
|
||||
|
||||
tt->did_ifconfig = true;
|
||||
@ -1105,21 +1104,21 @@ do_ifconfig (struct tuntap *tt,
|
||||
ifconfig_remote_netmask,
|
||||
tun_mtu
|
||||
);
|
||||
|
||||
|
||||
argv_msg (M_INFO, &argv);
|
||||
openvpn_execve_check (&argv, es, S_FATAL, "FreeBSD ifconfig failed");
|
||||
tt->did_ifconfig = true;
|
||||
|
||||
/* Add a network route for the local tun interface */
|
||||
if (!tun && tt->topology == TOP_SUBNET)
|
||||
{
|
||||
{
|
||||
struct route r;
|
||||
CLEAR (r);
|
||||
r.defined = true;
|
||||
CLEAR (r);
|
||||
r.flags = RT_DEFINED;
|
||||
r.network = tt->local & tt->remote_netmask;
|
||||
r.netmask = tt->remote_netmask;
|
||||
r.gateway = tt->local;
|
||||
add_route (&r, tt, 0, es);
|
||||
r.gateway = tt->local;
|
||||
add_route (&r, tt, 0, NULL, es);
|
||||
}
|
||||
|
||||
if ( do_ipv6 )
|
||||
|
Loading…
Reference in New Issue
Block a user