Hello,
I've recently updated to the 28th of August snapshot and I've discovered that I
cannot add static routes with an indirect next-hop, for example where the
gateway
address is not directly connected on an interface but is known via another
static
route.
I believe that this was introduced by the changes in sys/net/route.c at
revision 1.316
after which rt_setgwroute can return ELOOP.
I was previously running the 13th of August snapshot and in that version I
didn't
have any problems related to this.
Here is a simple example. If there is any other information that I can provide
please
let me know.
user@laptop ~ $ sysctl kern.version
kern.version=OpenBSD 6.0-current (GENERIC.MP) #2400: Sun Aug 28 12:30:07 MDT
2016
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
user@laptop ~ $ ifconfig em0
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 54:ee:75:88:d9:89
index 1 priority 0 llprio 3
groups: egress
media: Ethernet autoselect (1000baseT
full-duplex,master,rxpause,txpause)
status: active
inet 192.168.1.99 netmask 0xffffff00 broadcast 192.168.1.255
user@laptop ~ $ route -n show -inet
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu Prio Iface
224/4 127.0.0.1 URS 0 0 32768 8 lo0
127/8 127.0.0.1 UGRS 0 0 32768 8 lo0
127.0.0.1 127.0.0.1 UHl 6 3549 32768 1 lo0
192.168.1/24 192.168.1.99 UC 0 0 - 4 em0
192.168.1.99 54:ee:75:88:d9:89 UHLl 0 0 - 1 em0
192.168.1.255 192.168.1.99 UHb 0 0 - 1 em0
user@laptop ~ $ doas route add 192.168.2.0/24 192.168.1.1
add net 192.168.2.0/24: gateway 192.168.1.1
user@laptop ~ $ route -n show -inet
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu Prio Iface
224/4 127.0.0.1 URS 0 0 32768 8 lo0
127/8 127.0.0.1 UGRS 0 0 32768 8 lo0
127.0.0.1 127.0.0.1 UHl 6 3837 32768 1 lo0
192.168.1/24 192.168.1.99 UC 1 0 - 4 em0
192.168.1.1 link#1 UHLc 1 2 - 4 em0
192.168.1.99 54:ee:75:88:d9:89 UHLl 0 0 - 1 em0
192.168.1.255 192.168.1.99 UHb 0 0 - 1 em0
192.168.2/24 192.168.1.1 UGS 0 0 - 8 em0
user@laptop ~ $ doas route add 192.168.3.0/24 192.168.2.1
add net 192.168.3.0/24: gateway 192.168.2.1: Too many levels of symbolic links
user@laptop ~ $ route -n show -inet
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu Prio Iface
224/4 127.0.0.1 URS 0 0 32768 8 lo0
127/8 127.0.0.1 UGRS 0 0 32768 8 lo0
127.0.0.1 127.0.0.1 UHl 6 3981 32768 1 lo0
192.168.1/24 192.168.1.99 UC 1 0 - 4 em0
192.168.1.1 link#1 UHLc 1 2 - 4 em0
192.168.1.99 54:ee:75:88:d9:89 UHLl 0 0 - 1 em0
192.168.1.255 192.168.1.99 UHb 0 0 - 1 em0
192.168.2/24 192.168.1.1 UGS 0 2 - 8 em0
--
Andrei.