index eaeb6cc..48ae915 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -1097,13 +1097,12 @@ do_ifconfig (struct tuntap *tt, if ( tt->topology == TOP_SUBNET ) { argv_printf (&argv, - "%s %s %s %s mtu %d netmask %s up", + "%s %s %s netmask %s mtu %d up", IFCONFIG_PATH, actual, ifconfig_local, - ifconfig_local, - tun_mtu, - ifconfig_remote_netmask + ifconfig_remote_netmask, + tun_mtu ); } else @@ -2443,7 +2442,7 @@ open_tun (const char *dev, const char *dev_type, const char *dev_node, struct tu if (tt->fd >= 0) { - int i = IFF_POINTOPOINT|IFF_MULTICAST; + int i = (tt->topology == TOP_SUBNET ? IFF_BROADCAST : IFF_POINTOPOINT)|IFF_MULTICAST; ioctl (tt->fd, TUNSIFMODE, &i); /* multicast on */ i = 0; ioctl (tt->fd, TUNSLMODE, &i); /* link layer mode off */