diff options
author | brian <brian@FreeBSD.org> | 1999-06-22 11:31:42 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-06-22 11:31:42 +0000 |
commit | d252fb51781d3bcdc1697ebd89678c9a00d94124 (patch) | |
tree | 30b96e9960142fb2a8af3ca351f99a74b884ba4c /usr.sbin/ppp/bundle.c | |
parent | c630b9512122039558f73abb4efdedc98da7e268 (diff) | |
download | FreeBSD-src-d252fb51781d3bcdc1697ebd89678c9a00d94124.zip FreeBSD-src-d252fb51781d3bcdc1697ebd89678c9a00d94124.tar.gz |
Disable TUNSLMODE when we first open the tun device.
Submitted by: Ian West <ian@niw.com.au>
Diffstat (limited to 'usr.sbin/ppp/bundle.c')
-rw-r--r-- | usr.sbin/ppp/bundle.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c index 4529732..27e51d6 100644 --- a/usr.sbin/ppp/bundle.c +++ b/usr.sbin/ppp/bundle.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bundle.c,v 1.55 1999/05/31 23:57:32 brian Exp $ + * $Id: bundle.c,v 1.56 1999/06/02 00:46:50 brian Exp $ */ #include <sys/param.h> @@ -722,7 +722,7 @@ bundle_Create(const char *prefix, int type, const char **argv) static struct bundle bundle; /* there can be only one */ int enoentcount, err; const char *ifname; -#ifdef TUNSIFMODE +#if defined(TUNSIFMODE) || defined(TUNSLMODE) int iff; #endif @@ -780,6 +780,14 @@ bundle_Create(const char *prefix, int type, const char **argv) strerror(errno)); #endif +#ifdef TUNSLMODE + /* Make sure we're POINTOPOINT */ + iff = 0; + if (ID0ioctl(bundle.dev.fd, TUNSLMODE, &iff) < 0) + log_Printf(LogERROR, "bundle_Create: ioctl(TUNSLMODE): %s\n", + strerror(errno)); +#endif + if (!iface_SetFlags(bundle.iface, IFF_UP)) { iface_Destroy(bundle.iface); bundle.iface = NULL; |