In gmane.os.openbsd.misc, you wrote:
> On 09/03/13 14:50, Stuart Henderson wrote:
>> Yes, the routes to carp interfaces in BACKUP are advertised but with a
>> low priority (better to have the route stay in the table, even if it goes
>> to a backup firewall, rather than have it drop in and out).
>
> Sorry to jump in, but Stuart are we sure about this?
> In a current setup only the active firewall (carp master) is advertising 
> the network.

Hmm. Well that is the idea, but it seems it was accidentally eaten
by a tidy-up diff (ospfe.c r1.83). This restores it:

Index: ospfe.c
===================================================================
RCS file: /cvs/src/usr.sbin/ospfd/ospfe.c,v
retrieving revision 1.85
diff -u -p -r1.85 ospfe.c
--- ospfe.c     17 Jan 2013 10:07:56 -0000      1.85
+++ ospfe.c     11 Mar 2013 22:31:31 -0000
@@ -870,9 +870,12 @@ orig_rtr_lsa(struct area *area)
                         * do not add a stub net LSA for interfaces that are:
                         *  - down
                         *  - have a linkstate which is down
+                        * unless they're carp, in which case down == backup
                         */
                        if (!(iface->flags & IFF_UP) ||
-                           !LINK_STATE_IS_UP(iface->linkstate))
+                           (!LINK_STATE_IS_UP(iface->linkstate) &&
+                           !(iface->media_type == IFT_CARP &&
+                           iface->linkstate == LINK_STATE_DOWN)))
                                continue;
                        log_debug("orig_rtr_lsa: stub net, "
                            "interface %s", iface->name);

> In advance I still cannot add carp interfaces (carpXX) to a different 
> area except 0.0.0.0
> http://marc.info/?l=openbsd-misc&m=136267654831883&w=2

No idea about this, config below pretty much works for me.

area 0.0.0.1 {
        stub
        interface lo1 { passive }
        interface vlan700 {
                metric 4
                demote carp
        }
        interface carp193:xxxxx { passive } ## on vlan80
        interface carp410 { passive }
        interface carp411 { passive }
        interface carp412 { passive }
<...snip some lines...>
        interface carp721 { passive }
        interface carp881 { passive }
}

Only problem is with the config parser getting confused about carp
interfaces added at runtime when the subnet is on both the vlan backing
interface and the carp interface because carp(4) doesn't send the
expected rtm's when the address is added in those cases. (Pondering
how best to fix that. It might be saner if ospfd notices the /32
on the carp interface and picks a matching network on the carpdev
instead, as that would also sort out some lladdr confusion..).

Reply via email to