Re: ospf6d exits after ospf6ctl reload

2017-03-13 Thread Jeremie Courreges-Anglas
Remi Locherer  writes:

> Hi,

Hi,

> ospf6d does not like beeing reloaded and exits.
>
> Below an example on -current running in VMM. I first noticed it
> on an OpenBSD 6.0 amd64 router on real hardware.

The issue has already been reported, it's not really new.  The code that
handles interfaces and addresses is different in ospfd and ospf6d.
I recently tried to sync that code but there were a few differences that
made it more difficult than expected.

> Remi
>
>
>
> r1# ifconfig -A
> lo0: flags=8049 mtu 32768
> index 3 priority 0 llprio 3
> groups: lo
> inet6 ::1 prefixlen 128
> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
> inet 127.0.0.1 netmask 0xff00
> vio0: flags=8b43 mtu 
> 1500
> lladdr fe:e1:bb:d1:10:e1
> index 1 priority 0 llprio 3
> groups: egress
> media: Ethernet autoselect
> status: active
> inet 192.168.250.101 netmask 0xff00 broadcast 192.168.250.255
> inet6 fe80::fce1:bbff:fed1:10e1%vio0 prefixlen 64 scopeid 0x1
> inet6 2001:db8::101 prefixlen 64
> enc0: flags=0<>
> index 2 priority 0 llprio 3
> groups: enc
> status: active
> vether0: flags=8843 mtu 1500
> lladdr fe:e1:ba:d0:08:cf
> index 5 priority 0 llprio 3
> groups: vether
> media: Ethernet autoselect
> status: active
> inet6 fe80::fce1:baff:fed0:8cf%vether0 prefixlen 64 scopeid 0x5
> inet6 2001:db8:a::101 prefixlen 64
> r1#
> r1# sysctl net.inet6.ip6.forwarding
> net.inet6.ip6.forwarding=1
> r1#
> r1# cat /etc/ospf6d.conf
> router-id 192.168.250.101
>
> area 0.0.0.0 {
> interface vio0
> interface vether0 { passive }
> }
> r1#
> r1#
> r1# ospf6d -dv
> if_newaddr: ifindex 3, addr fe80::1/64, dest ::
> if_newaddr: ifindex 1, addr fe80::fce1:bbff:fed1:10e1/64
> if_newaddr: ifindex 1, addr 2001:db8::101/64
> if_newaddr: ifindex 5, addr fe80::fce1:baff:fed0:8cf/64
> if_newaddr: ifindex 5, addr 2001:db8:a::101/64
> startup
> if_set_ipv6_checksum setting cksum offset to 12
> orig_rtr_lsa: area 0.0.0.0
> if_fsm: event UP resulted in action START and changing state for interface 
> vether0 from DOWN to DOWN
> if_join_group: interface vio0 addr ff02::5
> orig_rtr_lsa: area 0.0.0.0
> orig_link_lsa: interface vio0
> if_fsm: event UP resulted in action START and changing state for interface 
> vio0 from DOWN to WAIT
> orig_intra_lsa_net: area 0.0.0.0, interface vether0
> orig_intra_lsa_net: area 0.0.0.0, interface vio0
> orig_intra_lsa_rtr: area 0.0.0.0, interface vether0: 2001:db8:a::101/64
> spf_calc: area 0.0.0.0 calculated
> *(192.168.250.101, 0x2001, 0.0.0.0) cost 0 has nexthops []
> nbr_fsm: event HELLO_RECEIVED resulted in action START_INACTIVITY_TIMER and 
> changing state for neighbor ID 192.168.250.102 from DOWN to INIT
> nbr_fsm: event 2_WAY_RECEIVED resulted in action EVAL and changing state for 
> neighbor ID 192.168.250.102 from INIT to 2-WAY
> if_act_elect: interface vio0 old dr none new dr 192.168.250.102, old bdr none 
> new bdr 192.168.250.101
> if_join_group: interface vio0 addr ff02::6
> nbr_fsm: event ADJ_OK resulted in action EVAL and changing state for neighbor 
> ID 192.168.250.102 from 2-WAY to EXSTA
> orig_rtr_lsa: area 0.0.0.0
> orig_rtr_lsa: area 0.0.0.0
> orig_link_lsa: interface vio0
> orig_link_lsa: link local address fe80::fce1:bbff:fed1:10e1
> orig_link_lsa: prefix 2001:db8::
> if_fsm: event BACKUPSEEN resulted in action ELECT and changing state for 
> interface vio0 from WAIT to BCKUP
> if_act_elect: interface vio0 old dr 192.168.250.102 new dr 192.168.250.102, 
> old bdr 192.168.250.101 new bdr 192.168.250.101
> if_fsm: event NEIGHBORCHANGE resulted in action ELECT and changing state for 
> interface vio0 from BCKUP to BCKUP
> orig_intra_lsa_net: area 0.0.0.0, interface vether0
> orig_intra_lsa_net: area 0.0.0.0, interface vio0
> orig_intra_lsa_rtr: area 0.0.0.0, interface vether0: 2001:db8:a::101/64
> orig_intra_lsa_net: area 0.0.0.0, interface vether0
> orig_intra_lsa_net: area 0.0.0.0, interface vio0
> orig_intra_lsa_rtr: area 0.0.0.0, interface vether0: 2001:db8:a::101/64
> orig_intra_lsa_rtr: area 0.0.0.0, interface vio0: 2001:db8::101/64
> nbr_fsm: event NEGOTIATION_DONE resulted in action SNAPSHOT and changing 
> state for neighbor ID 192.168.250.102 from EXSTA to SNAP
> nbr_fsm: event SNAPSHOT_DONE resulted in action SNAPSHOT_DONE and changing 
> state for neighbor ID 192.168.250.102 from SNAP to EXCHG
> nbr_fsm: event EXCHANGE_DONE resulted in action EXCHANGE_DONE and changing 
> state for neighbor ID 192.168.250.102 from EXCHG to LOAD
> spf_calc: area 0.0.0.0 calculated
> *(192.168.250.101, 0x2001, 0.0.0.0) cost 0 has nexthops []
>  (192.168.250.102, 0x2001, 0.0.0.0) cost 16777215 has nexthops []
> ospf6d: rt_calc: Intra-Area-Prefix LSA 

ospf6d exits after ospf6ctl reload

2017-03-13 Thread Remi Locherer
Hi,

ospf6d does not like beeing reloaded and exits.

Below an example on -current running in VMM. I first noticed it
on an OpenBSD 6.0 amd64 router on real hardware.

Remi



r1# ifconfig -A
lo0: flags=8049 mtu 32768
index 3 priority 0 llprio 3
groups: lo
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet 127.0.0.1 netmask 0xff00
vio0: flags=8b43 mtu 
1500
lladdr fe:e1:bb:d1:10:e1
index 1 priority 0 llprio 3
groups: egress
media: Ethernet autoselect
status: active
inet 192.168.250.101 netmask 0xff00 broadcast 192.168.250.255
inet6 fe80::fce1:bbff:fed1:10e1%vio0 prefixlen 64 scopeid 0x1
inet6 2001:db8::101 prefixlen 64
enc0: flags=0<>
index 2 priority 0 llprio 3
groups: enc
status: active
vether0: flags=8843 mtu 1500
lladdr fe:e1:ba:d0:08:cf
index 5 priority 0 llprio 3
groups: vether
media: Ethernet autoselect
status: active
inet6 fe80::fce1:baff:fed0:8cf%vether0 prefixlen 64 scopeid 0x5
inet6 2001:db8:a::101 prefixlen 64
r1#
r1# sysctl net.inet6.ip6.forwarding
net.inet6.ip6.forwarding=1
r1#
r1# cat /etc/ospf6d.conf
router-id 192.168.250.101

area 0.0.0.0 {
interface vio0
interface vether0 { passive }
}
r1#
r1#
r1# ospf6d -dv
if_newaddr: ifindex 3, addr fe80::1/64, dest ::
if_newaddr: ifindex 1, addr fe80::fce1:bbff:fed1:10e1/64
if_newaddr: ifindex 1, addr 2001:db8::101/64
if_newaddr: ifindex 5, addr fe80::fce1:baff:fed0:8cf/64
if_newaddr: ifindex 5, addr 2001:db8:a::101/64
startup
if_set_ipv6_checksum setting cksum offset to 12
orig_rtr_lsa: area 0.0.0.0
if_fsm: event UP resulted in action START and changing state for interface 
vether0 from DOWN to DOWN
if_join_group: interface vio0 addr ff02::5
orig_rtr_lsa: area 0.0.0.0
orig_link_lsa: interface vio0
if_fsm: event UP resulted in action START and changing state for interface vio0 
from DOWN to WAIT
orig_intra_lsa_net: area 0.0.0.0, interface vether0
orig_intra_lsa_net: area 0.0.0.0, interface vio0
orig_intra_lsa_rtr: area 0.0.0.0, interface vether0: 2001:db8:a::101/64
spf_calc: area 0.0.0.0 calculated
*(192.168.250.101, 0x2001, 0.0.0.0) cost 0 has nexthops []
nbr_fsm: event HELLO_RECEIVED resulted in action START_INACTIVITY_TIMER and 
changing state for neighbor ID 192.168.250.102 from DOWN to INIT
nbr_fsm: event 2_WAY_RECEIVED resulted in action EVAL and changing state for 
neighbor ID 192.168.250.102 from INIT to 2-WAY
if_act_elect: interface vio0 old dr none new dr 192.168.250.102, old bdr none 
new bdr 192.168.250.101
if_join_group: interface vio0 addr ff02::6
nbr_fsm: event ADJ_OK resulted in action EVAL and changing state for neighbor 
ID 192.168.250.102 from 2-WAY to EXSTA
orig_rtr_lsa: area 0.0.0.0
orig_rtr_lsa: area 0.0.0.0
orig_link_lsa: interface vio0
orig_link_lsa: link local address fe80::fce1:bbff:fed1:10e1
orig_link_lsa: prefix 2001:db8::
if_fsm: event BACKUPSEEN resulted in action ELECT and changing state for 
interface vio0 from WAIT to BCKUP
if_act_elect: interface vio0 old dr 192.168.250.102 new dr 192.168.250.102, old 
bdr 192.168.250.101 new bdr 192.168.250.101
if_fsm: event NEIGHBORCHANGE resulted in action ELECT and changing state for 
interface vio0 from BCKUP to BCKUP
orig_intra_lsa_net: area 0.0.0.0, interface vether0
orig_intra_lsa_net: area 0.0.0.0, interface vio0
orig_intra_lsa_rtr: area 0.0.0.0, interface vether0: 2001:db8:a::101/64
orig_intra_lsa_net: area 0.0.0.0, interface vether0
orig_intra_lsa_net: area 0.0.0.0, interface vio0
orig_intra_lsa_rtr: area 0.0.0.0, interface vether0: 2001:db8:a::101/64
orig_intra_lsa_rtr: area 0.0.0.0, interface vio0: 2001:db8::101/64
nbr_fsm: event NEGOTIATION_DONE resulted in action SNAPSHOT and changing state 
for neighbor ID 192.168.250.102 from EXSTA to SNAP
nbr_fsm: event SNAPSHOT_DONE resulted in action SNAPSHOT_DONE and changing 
state for neighbor ID 192.168.250.102 from SNAP to EXCHG
nbr_fsm: event EXCHANGE_DONE resulted in action EXCHANGE_DONE and changing 
state for neighbor ID 192.168.250.102 from EXCHG to LOAD
spf_calc: area 0.0.0.0 calculated
*(192.168.250.101, 0x2001, 0.0.0.0) cost 0 has nexthops []
 (192.168.250.102, 0x2001, 0.0.0.0) cost 16777215 has nexthops []
ospf6d: rt_calc: Intra-Area-Prefix LSA (192.168.250.102, 1) references 
non-existent Network LSA (192.168.250.102, 1)
orig_intra_lsa_net: area 0.0.0.0, interface vether0
orig_intra_lsa_net: area 0.0.0.0, interface vio0
orig_intra_lsa_rtr: area 0.0.0.0, interface vether0: 2001:db8:a::101/64
orig_intra_lsa_rtr: area 0.0.0.0, interface vio0: 2001:db8::101/64
orig_rtr_lsa: area 0.0.0.0
orig_rtr_lsa: transit net, interface vio0
nbr_fsm: event LOADING_DONE resulted in action NOTHING and changing state for 
neighbor ID 192.168.250.102 from LOAD to FULL
orig_intra_lsa_net: