Hello bugs@,
I ran into an odd issue when adding a new vlan interface (1916) into a
running ospfd. While reloading ospfd, ospfd didn't pick up the new vlan
interface and returns an "unnumbered interface" error and citing the syntax
of ospfd.conf is incorrect.
When I renamed the vlan interface name to a different vlan interface, ospfd
reloads fine while the content of the new vlan interface is identical. So
it seems to be related to the vlan interface naming?
I have reproduced this on a test machine running openbsd 7.2 release, below
is the exact order to reproduce it. I have tested this on a system using
ixl and em interfaces, the results are similar.
This issue only appears when reloading ospfd, when restarting ospfd
completely using rcctl, the vlan1916 interface is working as expected.
======================================================
bsdtest$ doas cat ospfd.conf
# $OpenBSD: ospfd.conf,v 1.2 2018/08/07 07:06:20 claudio Exp $
# macros
id="192.0.2.5"
# global configuration
# router-id $id
# fib-update no
# stub router no
# spf-delay 1
# spf-holdtime 5
# auth-key secret
# auth-type simple
# hello-interval 10
# metric 10
# retransmit-interval 5
# router-dead-time 40
# router-priority 1
# transmit-delay 1
# rtlabel "DMZ" external-tag 1
# areas
area 0.0.0.0 {
interface lo0 {
passive
}
interface vlan1588 {
}
}
bsdtest$ doas ifconfig vlan1916
vlan1916: no such interface
bsdtest$ doas rcctl -f start ospfd
ospfd(ok)
bsdtest$ doas ospfctl show interface
Interface Address State HelloTimer Linkstate Uptime nc ac
vlan1588 1.1.1.1/31 WAIT 00:00:01 active 00:00:08 0 0
lo0 127.0.0.1/8 LOOP - unknown 00:00:08 0 0
bsdtest$
bsdtest$ doas cat hostname.vlan1916
parent em0 vnetid 1916
inet 2.2.2.2/31
mtu 9000
up
bsdtest$
bsdtest$ doas sh /etc/netstart vlan1916
bsdtest$ ifconfig vlan1916
vlan1916: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 9000
lladdr 02:01:bc:6c:5b:7d
index 13 priority 0 llprio 3
encap: vnetid 1916 parent em0 txprio packet rxprio outer
groups: vlan
media: Ethernet autoselect (1000baseT full-duplex)
status: active
inet 2.2.2.2 netmask 0xfffffffe
## added vlan1916 to ospfd:
bsdtest$ doas cat ospfd.conf
# $OpenBSD: ospfd.conf,v 1.2 2018/08/07 07:06:20 claudio Exp $
# macros
id="192.0.2.5"
# global configuration
# router-id $id
# fib-update no
# stub router no
# spf-delay 1
# spf-holdtime 5
# auth-key secret
# auth-type simple
# hello-interval 10
# metric 10
# retransmit-interval 5
# router-dead-time 40
# router-priority 1
# transmit-delay 1
# rtlabel "DMZ" external-tag 1
# areas
area 0.0.0.0 {
interface lo0 {
passive
}
interface vlan1588 {
}
interface vlan1916 {
}
}
bsdtest$ doas ospfctl reload
reload request sent.
bsdtest$ doas tail -f /var/log/messages
Nov 25 15:36:18 bsdtest ospfd[97315]: if_newaddr: corresponding if 13 not
found
Nov 25 15:36:18 bsdtest ospfd[97315]: interface with index 13 not found
Nov 25 15:37:08 bsdtest ospfd[97315]: /etc/ospfd.conf:31: unnumbered
interface vlan1916
Nov 25 15:37:08 bsdtest ospfd[97315]: configuration reload failed
=======================================================================================
### Fix by renaming the hostname.vlan1916 interface to hostname.vlan1000
## uncommenting vlan1916 from previous attempt
bsdtest$ doas cat ospfd.conf
# $OpenBSD: ospfd.conf,v 1.2 2018/08/07 07:06:20 claudio Exp $
# macros
id="192.0.2.5"
# global configuration
# router-id $id
# fib-update no
# stub router no
# spf-delay 1
# spf-holdtime 5
# auth-key secret
# auth-type simple
# hello-interval 10
# metric 10
# retransmit-interval 5
# router-dead-time 40
# router-priority 1
# transmit-delay 1
# rtlabel "DMZ" external-tag 1
# areas
area 0.0.0.0 {
interface lo0 {
passive
}
interface vlan1588 {
}
# interface vlan1916 {
# }
}
bsdtest$
bsdtest$ doas ospfctl reload
reload request sent.
bsdtest$ doas ospfctl show interface
Interface Address State HelloTimer Linkstate Uptime nc ac
vlan1588 1.1.1.1/31 DR 00:00:05 active 00:08:54 0 0
lo0 127.0.0.1/8 LOOP - unknown 00:08:54 0 0
bsdtest$
bsdtest$ doas ifconfig vlan1916 destroy
bsdtest$ ifconfig vlan1916
vlan1916: no such interface
bsdtest$
bsdtest$ doas mv hostname.vlan1916 hostname.vlan1000
bsdtest$ ifconfig vlan1000
vlan1000: no such interface
bsdtest$ doas sh /etc/netstart vlan1000
bsdtest$
bsdtest$ ifconfig vlan1000
vlan1000: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 9000
lladdr 02:01:bc:6c:5b:7d
index 14 priority 0 llprio 3
encap: vnetid 1916 parent em0 txprio packet rxprio outer
groups: vlan
media: Ethernet autoselect (1000baseT full-duplex)
status: active
inet 2.2.2.2 netmask 0xfffffffe
bsdtest$
## adding vlan1000
bsdtest$ doas cat ospfd.conf
# $OpenBSD: ospfd.conf,v 1.2 2018/08/07 07:06:20 claudio Exp $
# macros
id="192.0.2.5"
# global configuration
# router-id $id
# fib-update no
# stub router no
# spf-delay 1
# spf-holdtime 5
# auth-key secret
# auth-type simple
# hello-interval 10
# metric 10
# retransmit-interval 5
# router-dead-time 40
# router-priority 1
# transmit-delay 1
# rtlabel "DMZ" external-tag 1
# areas
area 0.0.0.0 {
interface lo0 {
passive
}
interface vlan1588 {
}
interface vlan1000 {
}
}
bsdtest$
bsdtest$ doas ospfctl reload
reload request sent.
bsdtest$ doas ospfctl show interfaces
Interface Address State HelloTimer Linkstate Uptime nc ac
vlan1000 2.2.2.2/31 WAIT 00:00:01 active 00:00:08 0 0
vlan1588 1.1.1.1/31 DR 00:00:01 active 00:10:29 0 0
lo0 127.0.0.1/8 LOOP - unknown 00:10:29 0 0
bsdtest$
--
Wouter Prins
[email protected]