Module Name:    src
Committed By:   maxv
Date:           Wed Feb 14 14:15:53 UTC 2018

Modified Files:
        src/sys/net: if_llatbl.c
        src/sys/netinet: if_arp.c in.c

Log Message:
Remove IFF_STATICARP, we don't support this, and the code is useless in its
current form.

ok ozaki-r@


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/net/if_llatbl.c
cvs rdiff -u -r1.265 -r1.266 src/sys/netinet/if_arp.c
cvs rdiff -u -r1.217 -r1.218 src/sys/netinet/in.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/net/if_llatbl.c
diff -u src/sys/net/if_llatbl.c:1.22 src/sys/net/if_llatbl.c:1.23
--- src/sys/net/if_llatbl.c:1.22	Fri Nov 10 07:24:28 2017
+++ src/sys/net/if_llatbl.c	Wed Feb 14 14:15:53 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_llatbl.c,v 1.22 2017/11/10 07:24:28 ozaki-r Exp $	*/
+/*	$NetBSD: if_llatbl.c,v 1.23 2018/02/14 14:15:53 maxv Exp $	*/
 /*
  * Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved.
  * Copyright (c) 2004-2008 Qing Li. All rights reserved.
@@ -379,12 +379,7 @@ llentry_alloc(struct ifnet *ifp, struct 
 	IF_AFDATA_RLOCK(ifp);
 	la = lla_lookup(lt, LLE_EXCLUSIVE, (struct sockaddr *)dst);
 	IF_AFDATA_RUNLOCK(ifp);
-	if ((la == NULL) &&
-#ifdef __FreeBSD__
-	    (ifp->if_flags & (IFF_NOARP | IFF_STATICARP)) == 0) {
-#else /* XXX */
-	    (ifp->if_flags & IFF_NOARP) == 0) {
-#endif
+	if ((la == NULL) && (ifp->if_flags & IFF_NOARP) == 0) {
 		IF_AFDATA_WLOCK(ifp);
 		la = lla_create(lt, 0, (struct sockaddr *)dst, NULL /* XXX */);
 		IF_AFDATA_WUNLOCK(ifp);

Index: src/sys/netinet/if_arp.c
diff -u src/sys/netinet/if_arp.c:1.265 src/sys/netinet/if_arp.c:1.266
--- src/sys/netinet/if_arp.c:1.265	Tue Feb 13 14:50:28 2018
+++ src/sys/netinet/if_arp.c	Wed Feb 14 14:15:53 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_arp.c,v 1.265 2018/02/13 14:50:28 maxv Exp $	*/
+/*	$NetBSD: if_arp.c,v 1.266 2018/02/14 14:15:53 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.265 2018/02/13 14:50:28 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.266 2018/02/14 14:15:53 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -746,18 +746,13 @@ arpresolve(struct ifnet *ifp, const stru
 	}
 
 notfound:
-#ifdef IFF_STATICARP /* FreeBSD */
-#define _IFF_NOARP (IFF_NOARP | IFF_STATICARP)
-#else
-#define _IFF_NOARP IFF_NOARP
-#endif
-	if (ifp->if_flags & _IFF_NOARP) {
+	if (ifp->if_flags & IFF_NOARP) {
 		if (la != NULL)
 			LLE_RUNLOCK(la);
 		error = ENOTSUP;
 		goto bad;
 	}
-#undef _IFF_NOARP
+
 	if (la == NULL) {
 		struct rtentry *_rt;
 

Index: src/sys/netinet/in.c
diff -u src/sys/netinet/in.c:1.217 src/sys/netinet/in.c:1.218
--- src/sys/netinet/in.c:1.217	Thu Feb  8 10:11:38 2018
+++ src/sys/netinet/in.c	Wed Feb 14 14:15:53 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: in.c,v 1.217 2018/02/08 10:11:38 ozaki-r Exp $	*/
+/*	$NetBSD: in.c,v 1.218 2018/02/14 14:15:53 maxv Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.217 2018/02/08 10:11:38 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.218 2018/02/14 14:15:53 maxv Exp $");
 
 #include "arp.h"
 
@@ -2047,11 +2047,7 @@ in_lltable_rtcheck(struct ifnet *ifp, u_
 	if (rt->rt_flags & RTF_GATEWAY) {
 		if (!(rt->rt_flags & RTF_HOST) || !rt->rt_ifp ||
 		    rt->rt_ifp->if_type != IFT_ETHER ||
-#ifdef __FreeBSD__
-		    (rt->rt_ifp->if_flags & (IFF_NOARP | IFF_STATICARP)) != 0 ||
-#else
 		    (rt->rt_ifp->if_flags & IFF_NOARP) != 0 ||
-#endif
 		    memcmp(rt->rt_gateway->sa_data, l3addr->sa_data,
 		    sizeof(in_addr_t)) != 0) {
 			goto error;

Reply via email to