On 20/05/15(Wed) 14:14, Johan Ymerson wrote:
> [...]
> The patch did not apply cleanly to OPENBSD_5_7, I rewrote the patch a
> bit:

Thanks, I committed my diff to -current.

> With this patch everything (almost) work. At least as good as my patch
> did. OSPFd still does something wrong with the link state of carp
> interfaces when starting. Have a look at this:
> 
> fw2:/usr/src/sys # ospfctl show int
> 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   -          invalid    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   -          backup     00:00:00   0   0
> bnx0        192.168.200.5/24   OTHER  00:00:00   active     00:13:13   4   2
> 
> carp2 is (correctly) invalid, because the cable is plugged.
> carp1 is _not_ invalid.  If I restart ospfd after the system has come up it
> looks better:
> carp1       31.15.61.129/26    DOWN   -          backup     00:00:00   0   0
> 
> This happens with random interfaces at start-up.
> I believe this may be the cause:
> in usr.sbin/ospfd/interface.c, if_act_start():
> 
>         if (!((iface->flags & IFF_UP) &&
>             LINK_STATE_IS_UP(iface->linkstate)))
>                 return (0);
> 
> This check lack the exception for carp interfaces found in ospfe.c. If
> the interface already has been initialized when ospfd starts, it will
> not pick that interface up as a carp interface.

I don't know much about ospfd but if changing this check solves your
issues, feel free to send a diff.  I'd suggest creating a new thread
with an obvious name :)

Reply via email to