[Bug 245181] Proxy ARP (net.link.ether.inet.proxyall) does not work for FIB other than 0

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Mar 31 05:28:32 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245181

--- Comment #4 from Scott Aitken <freebsd-bugzilla at thismonkey.com> ---
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) != 0)
        goto drop;

I believe this is where the target of the ARP request is looked up (line 1073
also validates the source - which would also require fixing as it only checks
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=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
       
options=e403bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
        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=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

# 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=0
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=1
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 

(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

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the freebsd-net mailing list