Module Name:    src
Committed By:   maxv
Date:           Tue Feb 13 10:05:05 UTC 2018

Modified Files:
        src/sys/netinet: if_arp.c

Log Message:
Replace dead code by KASSERT.


To generate a diff of this commit:
cvs rdiff -u -r1.260 -r1.261 src/sys/netinet/if_arp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/if_arp.c
diff -u src/sys/netinet/if_arp.c:1.260 src/sys/netinet/if_arp.c:1.261
--- src/sys/netinet/if_arp.c:1.260	Tue Feb 13 08:51:37 2018
+++ src/sys/netinet/if_arp.c	Tue Feb 13 10:05:05 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.c,v 1.260 2018/02/13 08:51:37 maxv Exp $	*/
+/*	$NetBSD: if_arp.c,v 1.261 2018/02/13 10:05:05 maxv Exp $	*/
 
 /*
  * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.260 2018/02/13 08:51:37 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.261 2018/02/13 10:05:05 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -1232,20 +1232,7 @@ in_arpinput(struct mbuf *m)
 		}
 	}
 
-	/* XXX llentry should have addrlen? */
-#if 0
-	/*
-	 * sanity check for the address length.
-	 * XXX this does not work for protocols with variable address
-	 * length. -is
-	 */
-	if (sdl->sdl_alen && sdl->sdl_alen != ah->ar_hln) {
-		ARP_STATINC(ARP_STAT_RCVLENCHG);
-		log(LOG_WARNING,
-		    "arp from %s: new addr len %d, was %d\n",
-		    IN_PRINT(ipbuf, &isaddr), ah->ar_hln, sdl->sdl_alen);
-	}
-#endif
+	KASSERT(ifp->if_sadl->sdl_alen == ifp->if_addrlen);
 
 #if NTOKEN > 0
 	/*

Reply via email to