summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/bundle.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-03-25 11:37:51 +0000
committerbrian <brian@FreeBSD.org>1999-03-25 11:37:51 +0000
commit6354640a086958326d9e8105a50d48de0c6eefc1 (patch)
treec564a47b27d7c00673fe7db62c691350a8ec97f5 /usr.sbin/ppp/bundle.c
parente6546aa8258cf224b6e2e77259f9817646f12d02 (diff)
downloadFreeBSD-src-6354640a086958326d9e8105a50d48de0c6eefc1.zip
FreeBSD-src-6354640a086958326d9e8105a50d48de0c6eefc1.tar.gz
Undo possible damage done by the new TUNSIFMODE ioctl
in FreeBSD-current.
Diffstat (limited to 'usr.sbin/ppp/bundle.c')
-rw-r--r--usr.sbin/ppp/bundle.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c
index 4c4d041..efab874 100644
--- a/usr.sbin/ppp/bundle.c
+++ b/usr.sbin/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.48 1999/03/04 17:42:14 brian Exp $
+ * $Id: bundle.c,v 1.49 1999/03/07 01:41:40 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.
*/
OpenPOWER on IntegriCloud