diff options
author | brian <brian@cvs.openbsd.org> | 1999-03-25 11:37:17 +0000 |
---|---|---|
committer | brian <brian@cvs.openbsd.org> | 1999-03-25 11:37:17 +0000 |
commit | 55783f8f1e45b809c7a462257ded95a21925ac2a (patch) | |
tree | 1bd86cb4d218bbed8132c9fed17a37193530c578 /usr.sbin/ppp | |
parent | 4a0cf6bc6ba7195192d328135274d151bcc710b3 (diff) |
Undo possible damage done by the new TUNSIFMODE ioctl
in FreeBSD-current.
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r-- | usr.sbin/ppp/ppp/bundle.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.sbin/ppp/ppp/bundle.c b/usr.sbin/ppp/ppp/bundle.c index 21f667d71a1..30dc0696978 100644 --- a/usr.sbin/ppp/ppp/bundle.c +++ b/usr.sbin/ppp/ppp/bundle.c @@ -23,13 +23,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bundle.c,v 1.12 1999/03/07 01:42:14 brian Exp $ + * $Id: bundle.c,v 1.13 1999/03/25 11:37:16 brian Exp $ */ #include <sys/param.h> #include <sys/socket.h> #include <netinet/in.h> #include <net/if.h> +#include <net/if_tun.h> #include <arpa/inet.h> #include <net/route.h> #include <netinet/in_systm.h> @@ -739,6 +740,9 @@ bundle_Create(const char *prefix, int type, const char **argv) const char *ifname; struct ifreq ifrq; static struct bundle bundle; /* there can be only one */ +#ifdef TUNSIFMODE + int iff; +#endif if (bundle.iface != NULL) { /* Already allocated ! */ log_Printf(LogALERT, "bundle_Create: There's only one BUNDLE !\n"); @@ -794,6 +798,14 @@ bundle_Create(const char *prefix, int type, const char **argv) return NULL; } +#ifdef TUNSIFMODE + /* Make sure we're POINTOPOINT */ + iff = IFF_POINTOPOINT; + if (ID0ioctl(bundle.dev.fd, TUNSIFMODE, &iff) < 0) + log_Printf(LogERROR, "bundle_Create: ioctl(TUNSIFMODE): %s\n", + strerror(errno)); +#endif + /* * Now, bring up the interface. */ |