]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospf6d: Minor changes for stub area
authorYash Ranjan <ranjany@vmware.com>
Tue, 23 Mar 2021 05:05:01 +0000 (22:05 -0700)
committerYash Ranjan <ranjany@vmware.com>
Mon, 29 Mar 2021 13:37:10 +0000 (06:37 -0700)
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
ospf6d/ospf6_abr.c

index 140fc0d3d41eb6acc9c4d0a0ba8fad7d5560e73f..c93f7b1abe85bb15a84a2537f79594af8b6d3167 100644 (file)
@@ -46,6 +46,7 @@
 
 #include "ospf6_flood.h"
 #include "ospf6_intra.h"
+#include "ospf6_asbr.h"
 #include "ospf6_abr.h"
 #include "ospf6d.h"
 
@@ -646,11 +647,24 @@ void ospf6_abr_defaults_to_stub(struct ospf6 *o)
        struct listnode *node, *nnode;
        struct ospf6_area *oa;
        struct ospf6_route *def, *route;
+       struct ospf6_redist *red;
        int type = DEFAULT_ROUTE;
+       struct prefix_ipv6 p = {};
 
        if (!o->backbone)
                return;
 
+       red = ospf6_redist_lookup(o, type, 0);
+       if (!red)
+               return;
+
+       p.family = AF_INET6;
+       p.prefixlen = 0;
+
+       route = ospf6_route_lookup((struct prefix *)&p, o->external_table);
+       if (!route)
+               return;
+
        def = ospf6_route_create();
        def->type = OSPF6_DEST_TYPE_NETWORK;
        def->prefix.family = AF_INET6;