From af6209a13380cf2469b615ca2149796a697c2ba9 Mon Sep 17 00:00:00 2001 From: "Andrey V. Elsukov" Date: Mon, 24 Nov 2014 21:51:43 +0000 Subject: [PATCH] Skip L2 addresses lookups for p2p interfaces. Discussed with: melifaro Sponsored by: Yandex LLC --- sys/netinet6/nd6.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index cedf6e2b873..b2b615c85af 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -2206,9 +2206,6 @@ nd6_need_cache(struct ifnet *ifp) case IFT_IEEE80211: #endif case IFT_INFINIBAND: - case IFT_GIF: /* XXX need more cases? */ - case IFT_PPP: - case IFT_TUNNEL: case IFT_BRIDGE: case IFT_PROPVIRTUAL: return (1); @@ -2235,6 +2232,8 @@ nd6_add_ifa_lle(struct in6_ifaddr *ia) struct llentry *ln; ifp = ia->ia_ifa.ifa_ifp; + if (nd6_need_cache(ifp) == 0) + return (0); IF_AFDATA_LOCK(ifp); ia->ia_ifa.ifa_rtrequest = nd6_rtrequest; ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR |