diff options
| author | Russ White <russ@riw.us> | 2021-06-08 10:24:29 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-08 10:24:29 -0400 |
| commit | 1c5cc081286310d969a3655a8262d63ac8946865 (patch) | |
| tree | 69e9b5db3ae7191ebb823bae76790b698e49dc77 /ospf6d/ospf6_interface.c | |
| parent | 7b450535c9aad7eebaeebc167a3f6ef2028922c8 (diff) | |
| parent | 12a97d4668593a05787000fae3e249667ac440e2 (diff) | |
Merge pull request #8727 from opensourcerouting/ospfv3-nssa
ospf6d: implement NSSA area support
Diffstat (limited to 'ospf6d/ospf6_interface.c')
| -rw-r--r-- | ospf6d/ospf6_interface.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index f037ea1f4d..b71d884fdc 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -1197,6 +1197,26 @@ static int ospf6_interface_show(struct vty *vty, struct interface *ifp, return 0; } +/* Find the global address to be used as a forwarding address in NSSA LSA.*/ +struct in6_addr *ospf6_interface_get_global_address(struct interface *ifp) +{ + struct listnode *n; + struct connected *c; + struct in6_addr *l = (struct in6_addr *)NULL; + + /* for each connected address */ + for (ALL_LIST_ELEMENTS_RO(ifp->connected, n, c)) { + /* if family not AF_INET6, ignore */ + if (c->address->family != AF_INET6) + continue; + + if (!IN6_IS_ADDR_LINKLOCAL(&c->address->u.prefix6)) + l = &c->address->u.prefix6; + } + return l; +} + + static int show_ospf6_interface_common(struct vty *vty, vrf_id_t vrf_id, int argc, struct cmd_token **argv, int idx_ifname, int intf_idx, |
