Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Remove IFF_STATICARP, we don't support this, and the cod...
details: https://anonhg.NetBSD.org/src/rev/0ae3e32697f4
branches: trunk
changeset: 829842:0ae3e32697f4
user: maxv <maxv%NetBSD.org@localhost>
date: Wed Feb 14 14:15:53 2018 +0000
description:
Remove IFF_STATICARP, we don't support this, and the code is useless in its
current form.
ok ozaki-r@
diffstat:
sys/net/if_llatbl.c | 9 ++-------
sys/netinet/if_arp.c | 13 ++++---------
sys/netinet/in.c | 8 ++------
3 files changed, 8 insertions(+), 22 deletions(-)
diffs (92 lines):
diff -r 9982095b7fb9 -r 0ae3e32697f4 sys/net/if_llatbl.c
--- a/sys/net/if_llatbl.c Wed Feb 14 14:04:48 2018 +0000
+++ b/sys/net/if_llatbl.c Wed Feb 14 14:15:53 2018 +0000
@@ -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 @@
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);
diff -r 9982095b7fb9 -r 0ae3e32697f4 sys/netinet/if_arp.c
--- a/sys/netinet/if_arp.c Wed Feb 14 14:04:48 2018 +0000
+++ b/sys/netinet/if_arp.c Wed Feb 14 14:15:53 2018 +0000
@@ -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 @@
}
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;
diff -r 9982095b7fb9 -r 0ae3e32697f4 sys/netinet/in.c
--- a/sys/netinet/in.c Wed Feb 14 14:04:48 2018 +0000
+++ b/sys/netinet/in.c Wed Feb 14 14:15:53 2018 +0000
@@ -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 @@
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;
Home |
Main Index |
Thread Index |
Old Index