summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1995-06-11 19:33:05 +0000
committerrgrimes <rgrimes@FreeBSD.org>1995-06-11 19:33:05 +0000
commit1b1ee5553889e207087539ddafa5dfd4e28bd585 (patch)
treeba998dfb4fcad03e00a5cbf58e2a0ad648bab6e6 /sys/net
parentb1a97daa1e06ab0de3071f979965878fd056292b (diff)
downloadFreeBSD-src-1b1ee5553889e207087539ddafa5dfd4e28bd585.zip
FreeBSD-src-1b1ee5553889e207087539ddafa5dfd4e28bd585.tar.gz
Merge RELENG_2_0_5 into HEAD
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_ethersubr.c12
-rw-r--r--sys/net/if_ppp.c16
2 files changed, 25 insertions, 3 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 18c45f4..ff63303 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93
- * $Id: if_ethersubr.c,v 1.7 1995/05/09 13:35:39 davidg Exp $
+ * $Id: if_ethersubr.c,v 1.8.2.1 1995/06/03 04:46:21 davidg Exp $
*/
#include <sys/param.h>
@@ -523,6 +523,7 @@ ether_addmulti(ifr, ac)
struct sockaddr_in *sin;
u_char addrlo[6];
u_char addrhi[6];
+ int set_allmulti = 0;
int s = splimp();
switch (ifr->ifr_addr.sa_family) {
@@ -543,6 +544,7 @@ ether_addmulti(ifr, ac)
*/
bcopy(ether_ipmulticast_min, addrlo, 6);
bcopy(ether_ipmulticast_max, addrhi, 6);
+ set_allmulti = 1;
}
else {
ETHER_MAP_IP_MULTICAST(&sin->sin_addr, addrlo);
@@ -592,6 +594,9 @@ ether_addmulti(ifr, ac)
ac->ac_multiaddrs = enm;
ac->ac_multicnt++;
splx(s);
+ if (set_allmulti)
+ ac->ac_if.if_flags |= IFF_ALLMULTI;
+
/*
* Return ENETRESET to inform the driver that the list has changed
* and its reception filter should be adjusted accordingly.
@@ -612,6 +617,7 @@ ether_delmulti(ifr, ac)
struct sockaddr_in *sin;
u_char addrlo[6];
u_char addrhi[6];
+ int unset_allmulti = 0;
int s = splimp();
switch (ifr->ifr_addr.sa_family) {
@@ -632,6 +638,7 @@ ether_delmulti(ifr, ac)
*/
bcopy(ether_ipmulticast_min, addrlo, 6);
bcopy(ether_ipmulticast_max, addrhi, 6);
+ unset_allmulti = 1;
}
else {
ETHER_MAP_IP_MULTICAST(&sin->sin_addr, addrlo);
@@ -671,6 +678,9 @@ ether_delmulti(ifr, ac)
free(enm, M_IFMADDR);
ac->ac_multicnt--;
splx(s);
+ if (unset_allmulti)
+ ac->ac_if.if_flags &= ~IFF_ALLMULTI;
+
/*
* Return ENETRESET to inform the driver that the list has changed
* and its reception filter should be adjusted accordingly.
diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c
index c0672ca..8cf302d 100644
--- a/sys/net/if_ppp.c
+++ b/sys/net/if_ppp.c
@@ -69,7 +69,7 @@
* Paul Mackerras (paulus@cs.anu.edu.au).
*/
-/* $Id: if_ppp.c,v 1.12 1995/03/29 20:34:17 ache Exp $ */
+/* $Id: if_ppp.c,v 1.13.2.1 1995/06/04 16:12:49 davidg Exp $ */
/* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */
#include "ppp.h"
@@ -200,7 +200,7 @@ pppattach()
sc->sc_if.if_name = "ppp";
sc->sc_if.if_unit = i++;
sc->sc_if.if_mtu = PPP_MTU;
- sc->sc_if.if_flags = IFF_POINTOPOINT;
+ sc->sc_if.if_flags = IFF_POINTOPOINT | IFF_MULTICAST;
sc->sc_if.if_type = IFT_PPP;
sc->sc_if.if_hdrlen = PPP_HDRLEN;
sc->sc_if.if_ioctl = pppioctl;
@@ -1526,6 +1526,18 @@ pppioctl(ifp, cmd, data)
case SIOCGIFMTU:
ifr->ifr_mtu = sc->sc_if.if_mtu;
break;
+ case SIOCADDMULTI:
+ case SIOCDELMULTI:
+ switch(ifr->ifr_addr.sa_family) {
+#ifdef INET
+ case AF_INET:
+ break;
+#endif
+ default:
+ error = EAFNOSUPPORT;
+ break;
+ }
+ break;
default:
error = EINVAL;
OpenPOWER on IntegriCloud