Source-Changes-HG archive

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

[src/trunk]: src/sys/net Avoid attempting to call arp related functions if th...



details:   https://anonhg.NetBSD.org/src/rev/6611c70b98dd
branches:  trunk
changeset: 323965:6611c70b98dd
user:      kre <kre%NetBSD.org@localhost>
date:      Tue Jul 10 11:00:40 2018 +0000

description:
Avoid attempting to call arp related functions if there is no
arp in the kernel.

diffstat:

 sys/net/if_llatbl.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r aacb136c4251 -r 6611c70b98dd sys/net/if_llatbl.c
--- a/sys/net/if_llatbl.c       Tue Jul 10 08:35:58 2018 +0000
+++ b/sys/net/if_llatbl.c       Tue Jul 10 11:00:40 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_llatbl.c,v 1.28 2018/07/10 01:23:13 ozaki-r Exp $   */
+/*     $NetBSD: if_llatbl.c,v 1.29 2018/07/10 11:00:40 kre Exp $       */
 /*
  * Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved.
  * Copyright (c) 2004-2008 Qing Li. All rights reserved.
@@ -691,10 +691,12 @@
                 */
                if (lle != NULL) {
                        size_t pkts_dropped = llentry_free(lle);
+#if defined(INET) && NARP > 0
                        if (dst->sa_family == AF_INET) {
                                arp_stat_add(ARP_STAT_DFRDROPPED,
                                    (uint64_t)pkts_dropped);
                        }
+#endif
                }
 
                lle = lla_create(llt, 0, dst, rt);



Home | Main Index | Thread Index | Old Index