aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2001-08-21 11:07:58 +0000
committerBrian Somers <brian@FreeBSD.org>2001-08-21 11:07:58 +0000
commitebdcbc6744a265121311f82bfaa5e315d7d34d95 (patch)
tree865da00fcc0a67c61cafad9286c0f73f1f3b5e61 /usr.sbin/ppp
parent19c6903f171ef56782d7531146835644ffc30346 (diff)
downloadsrc-ebdcbc6744a265121311f82bfaa5e315d7d34d95.tar.gz
src-ebdcbc6744a265121311f82bfaa5e315d7d34d95.zip
o Enable IFF_MULTICAST when first opening the tun device (and keep the flag
when we ioctl(TUNSIFINFO) under OpenBSD) o Don't bring the interface up immediately o Don't complain about unrecognised interface flags in ``show iface''.
Notes
Notes: svn path=/head/; revision=82048
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/bundle.c11
-rw-r--r--usr.sbin/ppp/iface.c9
-rw-r--r--usr.sbin/ppp/tun.c2
3 files changed, 11 insertions, 11 deletions
diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c
index adf5257db26f..6b76231d868f 100644
--- a/usr.sbin/ppp/bundle.c
+++ b/usr.sbin/ppp/bundle.c
@@ -746,8 +746,8 @@ bundle_Create(const char *prefix, int type, int unit)
}
#ifdef TUNSIFMODE
- /* Make sure we're POINTOPOINT */
- iff = IFF_POINTOPOINT;
+ /* Make sure we're POINTOPOINT & IFF_MULTICAST */
+ iff = IFF_POINTOPOINT | IFF_MULTICAST;
if (ID0ioctl(bundle.dev.fd, TUNSIFMODE, &iff) < 0)
log_Printf(LogERROR, "bundle_Create: ioctl(TUNSIFMODE): %s\n",
strerror(errno));
@@ -784,13 +784,6 @@ bundle_Create(const char *prefix, int type, int unit)
#endif
#endif
- if (!iface_SetFlags(bundle.iface->name, IFF_UP)) {
- iface_Destroy(bundle.iface);
- bundle.iface = NULL;
- close(bundle.dev.fd);
- return NULL;
- }
-
log_Printf(LogPHASE, "Using interface: %s\n", ifname);
bundle.bandwidth = 0;
diff --git a/usr.sbin/ppp/iface.c b/usr.sbin/ppp/iface.c
index 8375663b5ac7..d729a78dd435 100644
--- a/usr.sbin/ppp/iface.c
+++ b/usr.sbin/ppp/iface.c
@@ -622,11 +622,18 @@ iface_Show(struct cmdargs const *arg)
prompt_Printf(arg->prompt, "%s (idx %d) <", iface->name, iface->index);
for (f = 0; f < sizeof if_flags / sizeof if_flags[0]; f++)
- if ((if_flags[f].flag & flags) || (!if_flags[f].flag && flags)) {
+ if ((if_flags[f].flag & flags)) {
prompt_Printf(arg->prompt, "%s%s", flags == iface->flags ? "" : ",",
if_flags[f].value);
flags &= ~if_flags[f].flag;
}
+
+#if 0
+ if (flags)
+ prompt_Printf(arg->prompt, "%s0x%x", flags == iface->flags ? "" : ",",
+ flags);
+#endif
+
prompt_Printf(arg->prompt, "> mtu %d has %d address%s:\n", iface->mtu,
iface->addrs, iface->addrs == 1 ? "" : "es");
diff --git a/usr.sbin/ppp/tun.c b/usr.sbin/ppp/tun.c
index 2f7196f49a7a..e1f475872b97 100644
--- a/usr.sbin/ppp/tun.c
+++ b/usr.sbin/ppp/tun.c
@@ -111,7 +111,7 @@ tun_configure(struct bundle *bundle)
info.baudrate = bundle->bandwidth;
#ifdef __OpenBSD__
- info.flags = IFF_UP|IFF_POINTOPOINT;
+ info.flags = IFF_UP|IFF_POINTOPOINT|IFF_MULTICAST;
#endif
if (ID0ioctl(bundle->dev.fd, TUNSIFINFO, &info) < 0)
log_Printf(LogERROR, "tun_configure: ioctl(TUNSIFINFO): %s\n",