summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2007-05-16 09:24:08 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2007-05-16 09:24:08 +0000
commitd081e8afa7051794c0cecf7e74265a50cfe0e177 (patch)
tree45fc534adec4074db1177b49b2ad13190179d04f /sys/net
parentcc2740ca04e54245ef204caac53b127bd2516589 (diff)
count the number of multicast ranges that are kept in the list of multicast
addresses in struct arpcom. this lets a nic driver easily see if it wants allmulti behaviour, which in turn means we can clean some code up. ok jason@ claudio@ norby@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_ethersubr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 45d030e548a..4818545a3ca 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.106 2007/03/18 23:23:17 mpf Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.107 2007/05/16 09:24:07 dlg Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
@@ -1103,6 +1103,8 @@ ether_addmulti(ifr, ac)
enm->enm_refcount = 1;
LIST_INSERT_HEAD(&ac->ac_multiaddrs, enm, enm_list);
ac->ac_multicnt++;
+ if (bcmp(addrlo, addrhi, ETHER_ADDR_LEN) != 0)
+ ac->ac_multirangecnt++;
splx(s);
/*
* Return ENETRESET to inform the driver that the list has changed
@@ -1151,6 +1153,8 @@ ether_delmulti(ifr, ac)
LIST_REMOVE(enm, enm_list);
free(enm, M_IFMADDR);
ac->ac_multicnt--;
+ if (bcmp(addrlo, addrhi, ETHER_ADDR_LEN) != 0)
+ ac->ac_multirangecnt--;
splx(s);
/*
* Return ENETRESET to inform the driver that the list has changed