Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet Create a temporary define involving IFF_STATICAR...



details:   https://anonhg.NetBSD.org/src/rev/e5e52a402bf1
branches:  trunk
changeset: 340874:e5e52a402bf1
user:      roy <roy%NetBSD.org@localhost>
date:      Thu Oct 08 08:17:37 2015 +0000

description:
Create a temporary define involving IFF_STATICARP if we have it
instead of just testing for __FreeBSD__.
No functional change.

ok: ozaki-r@

diffstat:

 sys/netinet/if_arp.c |  17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diffs (46 lines):

diff -r 8b53c75bb46b -r e5e52a402bf1 sys/netinet/if_arp.c
--- a/sys/netinet/if_arp.c      Thu Oct 08 04:30:25 2015 +0000
+++ b/sys/netinet/if_arp.c      Thu Oct 08 08:17:37 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_arp.c,v 1.183 2015/10/07 00:33:27 ozaki-r Exp $     */
+/*     $NetBSD: if_arp.c,v 1.184 2015/10/08 08:17:37 roy 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.183 2015/10/07 00:33:27 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.184 2015/10/08 08:17:37 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -844,12 +844,14 @@
                IF_AFDATA_RUNLOCK(ifp);
        }
 
+#ifdef IFF_STATICARP /* FreeBSD */
+#define _IFF_NOARP (IFF_NOARP | IFF_STATICARP)
+#else
+#define _IFF_NOARP IFF_NOARP
+#endif
        if ((la == NULL) && ((flags & LLE_EXCLUSIVE) == 0)
-#ifdef __FreeBSD__
-           && ((ifp->if_flags & (IFF_NOARP | IFF_STATICARP)) == 0)) {
-#else
-           && ((ifp->if_flags & IFF_NOARP) == 0)) {
-#endif
+           && ((ifp->if_flags & _IFF_NOARP) == 0))
+       {
                flags |= LLE_EXCLUSIVE;
                IF_AFDATA_WLOCK(ifp);
                la = lla_create(LLTABLE(ifp), flags, dst);
@@ -862,6 +864,7 @@
                            ifp->if_xname);
                }
        }
+#undef _IFF_NOARP
 
        if (la == NULL) {
                m_freem(m);



Home | Main Index | Thread Index | Old Index