summaryrefslogtreecommitdiffstats
path: root/sys/net/if_ethersubr.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1997-07-15 23:25:32 +0000
committerjulian <julian@FreeBSD.org>1997-07-15 23:25:32 +0000
commitdb918dfad5688e9a2980e5a898e349c871ff9524 (patch)
tree70f80cb03d825482e92a9dd7b255da9a872cb055 /sys/net/if_ethersubr.c
parent245797ff55f2b110add3004d133b9cb7535cb219 (diff)
downloadFreeBSD-src-db918dfad5688e9a2980e5a898e349c871ff9524.zip
FreeBSD-src-db918dfad5688e9a2980e5a898e349c871ff9524.tar.gz
Finally track down the reason for some of my occasional kernel crashes.
Route(1) has a bug that sends a bad message to the kernel. The kernel trusts it and crashes. Add some sanity checks so that we don't trust the user quite as much any more. (also add a comment in if_ethersubr.c)
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r--sys/net/if_ethersubr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 48295ae..13be403 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.34 1997/03/24 11:33:11 bde Exp $
+ * $Id: if_ethersubr.c,v 1.35 1997/05/10 10:01:31 jhay Exp $
*/
#include <sys/param.h>
@@ -792,6 +792,9 @@ ether_resolvemulti(ifp, llsa, sa)
switch(sa->sa_family) {
case AF_LINK:
+ /*
+ * No mapping needed. Just check that it's a valid MC address.
+ */
sdl = (struct sockaddr_dl *)sa;
e_addr = LLADDR(sdl);
if ((e_addr[0] & 1) != 1)
OpenPOWER on IntegriCloud