Hi,

I have been testing the carp link state patch from last week (which
works perfectly, ifconfig shows correct state every time now).

ospfd however, sometime incorrectly think some interfaces are in state
"invalid" instead of "down" on startup:
Interface   Address            State  HelloTimer Linkstate  Uptime    nc  ac
carp7       195.58.98.145/28   DOWN   -          backup     00:00:00   0   0
carp5       192.168.253.1/24   DOWN   -          backup     00:00:00   0   0
carp3       192.168.202.1/24   DOWN   -          backup     00:00:00   0   0
carp2       192.168.254.1/23   DOWN   -          backup     00:00:00   0   0
carp1       31.15.61.129/26    DOWN   -          invalid    00:00:00   0   0
carp0       92.33.0.202/30     DOWN   -          invalid    00:00:00   0   0
bnx0        192.168.200.5/24   OTHER  00:00:02   active     00:01:47   4   2

after restarting ospfd, it detects the correct link state:
Interface   Address            State  HelloTimer Linkstate  Uptime    nc  ac
carp7       195.58.98.145/28   DOWN   -          backup     00:00:00   0   0
carp5       192.168.253.1/24   DOWN   -          backup     00:00:00   0   0
carp3       192.168.202.1/24   DOWN   -          backup     00:00:00   0   0
carp2       192.168.254.1/23   DOWN   -          backup     00:00:00   0   0
carp1       31.15.61.129/26    DOWN   -          backup     00:00:00   0   0
carp0       92.33.0.202/30     DOWN   -          backup     00:00:00   0   0
bnx0        192.168.200.5/24   OTHER  00:00:00   active     00:01:29   4   2

I figure this is some kind of race when ospfd initializes at the same
time as the kernel initializes all interfaces.
>From the debug log it seems that ospfd misses some events:
May 26 20:25:19 fw2 ospfd[380]: startup
May 26 20:25:22 fw2 ospfd[5184]: interface carp3 up
May 26 20:25:23 fw2 ospfd[5184]: interface carp5 up
May 26 20:25:23 fw2 ospfd[5184]: interface carp7 up
May 26 20:25:23 fw2 ospfd[5184]: interface carp2 up
May 26 20:25:23 fw2 ospfd[5184]: interface carp0 up
May 26 20:25:23 fw2 ospfd[5184]: interface carp0 down
May 26 20:25:23 fw2 ospfd[5184]: interface carp7 down
May 26 20:25:23 fw2 ospfd[5184]: interface carp2 down
May 26 20:25:23 fw2 ospfd[5184]: interface carp5 down
In this case, carp1 was left in the invalid state (but ifconfig shows
backup state). carp3 also looks suspicious in the log (missing a down
event), but is correctly reported as backup by ospfctl.

>From what I can see the event handler is correctly registered before
trying to start all interfaces in ospfe() so I really don't understand
where the race is.


/Johan Ymerson



Reply via email to