From owner-svn-src-all@freebsd.org Wed Dec 16 13:56:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65A86A49B06; Wed, 16 Dec 2015 13:56:21 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 342AA174F; Wed, 16 Dec 2015 13:56:21 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBG9G60p049307; Wed, 16 Dec 2015 09:16:06 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBG9G673049306; Wed, 16 Dec 2015 09:16:06 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201512160916.tBG9G673049306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Wed, 16 Dec 2015 09:16:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292329 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Dec 2015 13:56:21 -0000 Author: melifaro Date: Wed Dec 16 09:16:06 2015 New Revision: 292329 URL: https://svnweb.freebsd.org/changeset/base/292329 Log: Fix ARP reply handling changed in r286955. If source of ARP request didn't pass the routing check (e.g. not in directly connected network), be polite and still answer the request instead of dropping frame. Reported by: quadro at irc@rusnet Modified: head/sys/netinet/if_ether.c Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Wed Dec 16 09:11:11 2015 (r292328) +++ head/sys/netinet/if_ether.c Wed Dec 16 09:16:06 2015 (r292329) @@ -855,12 +855,20 @@ match: arp_check_update_lle(ah, isaddr, ifp, bridged, la); else if (itaddr.s_addr == myaddr.s_addr) { /* - * Reply to our address, but no lle exists yet. - * do we really have to create an entry? + * Request/reply to our address, but no lle exists yet. + * Try to create new llentry. */ la = lltable_alloc_entry(LLTABLE(ifp), 0, dst); - if (la == NULL) - goto drop; + if (la == NULL) { + + /* + * lle creation may fail if source address belongs + * to non-directly connected subnet. However, we + * will try to answer the request instead of dropping + * frame. + */ + goto reply; + } lltable_set_entry_addr(ifp, la, ar_sha(ah)); IF_AFDATA_WLOCK(ifp);