diff options
author | Yash Ranjan <ranjany@vmware.com> | 2021-03-23 06:05:01 +0100 |
---|---|---|
committer | Yash Ranjan <ranjany@vmware.com> | 2021-03-29 15:37:10 +0200 |
commit | 5f6635b9d4b58f49c89cec28ecf218e81f677555 (patch) | |
tree | 840eac2aa20707a4abde11b402619b0bf5086368 /ospf6d/ospf6_abr.c | |
parent | doc: Add documentation for default-information originate. (diff) | |
download | frr-5f6635b9d4b58f49c89cec28ecf218e81f677555.tar.xz frr-5f6635b9d4b58f49c89cec28ecf218e81f677555.zip |
ospf6d: Minor changes for stub area
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
Diffstat (limited to 'ospf6d/ospf6_abr.c')
-rw-r--r-- | ospf6d/ospf6_abr.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c index 140fc0d3d..c93f7b1ab 100644 --- a/ospf6d/ospf6_abr.c +++ b/ospf6d/ospf6_abr.c @@ -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; |