From owner-freebsd-net@freebsd.org Tue Mar 31 05:28:32 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3405227814F for ; Tue, 31 Mar 2020 05:28:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48ryXv2prxz46JF for ; Tue, 31 Mar 2020 05:28:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 2F5CD278147; Tue, 31 Mar 2020 05:28:22 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E90F278146 for ; Tue, 31 Mar 2020 05:28:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48ryXc6MqCz460t for ; Tue, 31 Mar 2020 05:28:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46C063939 for ; Tue, 31 Mar 2020 05:28:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 02V5S9r6043676 for ; Tue, 31 Mar 2020 05:28:09 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 02V5S93K043675 for net@FreeBSD.org; Tue, 31 Mar 2020 05:28:09 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 245181] Proxy ARP (net.link.ether.inet.proxyall) does not work for FIB other than 0 Date: Tue, 31 Mar 2020 05:28:01 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.1-RELEASE X-Bugzilla-Keywords: needs-qa X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: freebsd-bugzilla@thismonkey.com X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: melifaro@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? mfc-stable12? mfc-stable11? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 05:28:32 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D245181 --- Comment #4 from Scott Aitken --- I think the code at line 1051 is actually the culprit: /* XXX MRT use table 0 for arp reply */ if (fib4_lookup_nh_basic(0, itaddr, 0, 0, &nh4) !=3D 0) goto drop; I believe this is where the target of the ARP request is looked up (line 10= 73 also validates the source - which would also require fixing as it only chec= ks FIB 0). TESTING SETUP: Host_1: IP 10.1.1.60, constantly pinging 10.1.4.99 via router (.1) Host_2: IP 10.1.4.20/24 on vmx0, 10.1.4.99/32 on lo1, default via 10.1.4.1 Host_2: # sysctl net.add_addr_allfibs net.inet.ip.forwarding net.link.ether.inet.proxyall net.fibs net.add_addr_allfibs: 0 net.inet.ip.forwarding: 1 net.link.ether.inet.proxyall: 1 net.fibs: 2 TESTS (run on Host_2): --- Test FIB 0 and proxy ARP: # ifconfig vmx0 vmx0: flags=3D8843 metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3De403bb ether 00:50:56:8a:93:4e inet 10.1.4.20 netmask 0xffffff00 broadcast 10.1.4.255 media: Ethernet autoselect status: active nd6 options=3D29 # netstat -rn4 Routing tables Internet: Destination Gateway Flags Netif Expire default 10.1.4.1 UGS vmx0 10.1.4.0/24 link#1 U vmx0 10.1.4.20 link#1 UHS lo0 127.0.0.1 link#2 UH lo0 # ifconfig lo1 create inet 10.1.4.99/32 (ping 10.1.4.99 succeeds as expected) --- Test FIB 0 and NO proxy ARP: # sysctl net.link.ether.inet.proxyall=3D0 net.link.ether.inet.proxyall: 1 -> 0 (ARP entry on router for 10.1.4.99 deleted) (ping 10.1.4.99 fails as expected) --- Test FIB 0 and proxy ARP restored: # sysctl net.link.ether.inet.proxyall=3D1 net.link.ether.inet.proxyall: 0 -> 1 (ping 10.1.4.99 succeeds as expected) All test results as expected. --- Test FIB 1 and proxy ARP: # ifconfig vmx0 inet delete # ifconfig vmx0 inet 10.1.4.20/24 fib 1 # ifconfig lo1 destroy # ifconfig lo1 create inet 10.1.4.99/32 fib 1 # setfib 1 route add default 10.1.4.1 add net default: gateway 10.1.4.1 fib 1 # netstat -rn4 Routing tables Internet: Destination Gateway Flags Netif Expire 127.0.0.1 link#2 UH lo0 # setfib 1 netstat -rn4 Routing tables (fib: 1) Internet: Destination Gateway Flags Netif Expire default 10.1.4.1 UGS vmx0 10.1.4.0/24 link#1 U vmx0 10.1.4.20 link#1 UHS lo0 10.1.4.99 link#4 UH lo1 127.0.0.1 lo0 UHS lo0=20 (ARP entry on router for 10.1.4.99 deleted) (ping 10.1.4.99 fails NOT as expected) # tcpdump -i vmx0 arp tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on vmx0, link-type EN10MB (Ethernet), capture size 262144 bytes 12:04:28.438590 ARP, Request who-has 10.1.4.99 tell 10.1.4.1, length 46 --=20 You are receiving this mail because: You are on the CC list for the bug.=