Hello,

I have a strange problem with OpenBSD 6.2, which looks like a bug.
Steps to reproduce :

* sh /etc/netstart -> everything works. Routing table :
root@fw-t-wan-chut01:~ # netstat -rnf inet                                      
                                                                                
                                         
Routing tables

Internet:
Destination        Gateway            Flags   Refs      Use   Mtu  Prio Iface
default            10.194.119.254     UGS        0       16     -     8 bge0 
224/4              127.0.0.1          URS        0      798 32768     8 lo0  
10.194.116/22      10.194.116.29      UCn        1        1     -     4 bge0 
10.194.116/22      10.194.116.28      UCn        0        0     -    19 carp0
10.194.116.28      00:00:5e:00:01:0f  UHLl       0        3     -     1 carp0
10.194.116.29      40:a8:f0:36:22:0c  UHLl       0       28     -     1 bge0 
10.194.119.254     00:1b:2a:e9:c4:00  UHLch      2        5     -     3 bge0 
10.194.119.255     10.194.116.29      UHb        0        0     -     1 bge0 
10.194.119.255     10.194.116.28      UHb        0        0     -     1 carp0
127/8              127.0.0.1          UGRS       0        0 32768     8 lo0  
127.0.0.1          127.0.0.1          UHhl       1     1122 32768     1 lo0  
192.168.190/24     192.168.190.1      Cn         0        0     -     4 bge1 
192.168.190.1      40:a8:f0:36:22:0d  UHLl       0        0     -     1 bge1 
192.168.190.255    192.168.190.1      Hb         0        0     -     1 bge1
root@fw-t-wan-chut01:~ # ifconfig carp0                                         
                                                                                
                                        
carp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:00:5e:00:01:0f
        description: TL-INT-ADM-WAN
        index 10 priority 15 llprio 3
        carp: MASTER carpdev bge0 vhid 15 advbase 1 advskew 10
        groups: carp
        status: master
        inet 10.194.116.28 netmask 0xfffffc00 broadcast 10.194.119.255

* then sh /etc/netstart carp0 -> routed traffic stops working (ping 
10.194.125.120 says "sendmsg: Invalid argument"). 
Same result if I do ifconfig carp0 10.194.116.28/22.
Routing table and ifconfig look the same :
root@fw-t-wan-chut01:~ # netstat -rnf inet                                      
                                                                                
                                     
Routing tables

Internet:
Destination        Gateway            Flags   Refs      Use   Mtu  Prio Iface
default            10.194.119.254     UGS        5       58     -     8 bge0 
224/4              127.0.0.1          URS        0     3918 32768     8 lo0  
10.194.116/22      10.194.116.29      UCn        1    59014     -     4 bge0 
10.194.116/22      10.194.116.28      UCn        0        0     -    19 carp0
10.194.116.28      00:00:5e:00:01:0f  UHLl       0        7     -     1 carp0
10.194.116.29      40:a8:f0:36:22:0c  UHLl       0       40     -     1 bge0 
10.194.119.254     00:1b:2a:e9:c4:00  UHLc       0    29528     -     3 bge0 
10.194.119.255     10.194.116.29      UHb        0        0     -     1 bge0 
10.194.119.255     10.194.116.28      UHb        0        0     -     1 carp0
127/8              127.0.0.1          UGRS       0        0 32768     8 lo0  
127.0.0.1          127.0.0.1          UHhl       1     5498 32768     1 lo0  
192.168.190/24     192.168.190.1      Cn         0        0     -     4 bge1 
192.168.190.1      40:a8:f0:36:22:0d  UHLl       0        0     -     1 bge1 
192.168.190.255    192.168.190.1      Hb         0        0     -     1 bge1
root@fw-t-wan-chut01:~ # ifconfig carp0                                         
                                                                                
                                        
carp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:00:5e:00:01:0f
        description: TL-INT-ADM-WAN
        index 10 priority 15 llprio 3
        carp: MASTER carpdev bge0 vhid 15 advbase 1 advskew 10
        groups: carp
        status: master
        inet 10.194.116.28 netmask 0xfffffc00 broadcast 10.194.119.255

* then again sh /etc/netstart -> everything is working again.
Deleting and readding the default route also does the trick.

If I test something like :
root@fw-t-wan-chut01:~ # sh /etc/netstart
root@fw-t-wan-chut01:~ # ifconfig bge0 10.194.116.29/22
The default route disappears. This is a bit weird, but at least the routing 
table is consistent with what happens.

I figured a workaround by not using the mygate file, and adding a line in the 
hostname.bge0 and hostname.carp0 :
!route add default 10.194.119.254 1>/dev/null || route change default 
10.194.119.254 1>/dev/null


Additional informations :
Network configuration :
root@fw-t-wan-chut01:~ # cat /etc/hostname.bge0                                 
                                                                                
                                         
10.194.116.29/22 description "Admin"
up -inet6
root@fw-t-wan-chut01:~ # cat /etc/hostname.carp0
10.194.116.28/22 vhid 15 advskew 10 carpdev bge0 pass xxxx description 
"TL-INT-ADM-WAN"
up -inet6
root@fw-t-wan-chut01:~ # cat /etc/mygate
10.194.119.254

PF is disabled.


--
Cordialement,
Pierre Bardou

Reply via email to