]> git.puffer.fish Git - mirror/frr.git/commitdiff
isisd: remove unused router_address fields 14823/head
authorDavid Lamparter <equinox@opensourcerouting.org>
Thu, 16 Nov 2023 13:14:10 +0000 (14:14 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Thu, 16 Nov 2023 16:09:38 +0000 (17:09 +0100)
These were added in e38e0df01ad3 but never used anywhere.  Also the code
grabs any random /32 or /128 that is directly connected to the adjacent
router, which may not even be an address of that router itself.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
isisd/isis_adjacency.h
isisd/isis_route.c

index dc181055fa98534ef6ab4cb4f119ff602646f8d5..b5c7dd8d736cc84da7bfb16b48a73e5887f2194b 100644 (file)
@@ -74,12 +74,10 @@ struct isis_adjacency {
        struct nlpids nlpids; /* protocols spoken ... */
        struct in_addr *ipv4_addresses;
        unsigned int ipv4_address_count;
-       struct in_addr router_address;
        struct in6_addr *ll_ipv6_addrs; /* Link local IPv6 neighbor address */
        unsigned int ll_ipv6_count;
        struct in6_addr *global_ipv6_addrs; /* Global IPv6 neighbor address */
        unsigned int global_ipv6_count;
-       struct in6_addr router_address6;
        uint8_t prio[ISIS_LEVELS];      /* priorityOfNeighbour for DIS */
        int circuit_t;                  /* from hello PDU hdr */
        int level;                      /* level (1 or 2) */
index be92dcc22ef6ca5694775f34165238564855c038..b907c962bee2812fb653dd43da88dadd0140665d 100644 (file)
@@ -260,24 +260,6 @@ isis_route_info_new(struct prefix *prefix, struct prefix_ipv6 *src_p,
                               ISIS_CIRCUIT_FLAPPED_AFTER_SPF))
                        SET_FLAG(rinfo->flag, ISIS_ROUTE_FLAG_ZEBRA_RESYNC);
 
-               /* update neighbor router address */
-               switch (prefix->family) {
-               case AF_INET:
-                       if (depth == 2 && prefix->prefixlen == IPV4_MAX_BITLEN)
-                               adj->router_address = prefix->u.prefix4;
-                       break;
-               case AF_INET6:
-                       if (depth == 2 && prefix->prefixlen == IPV6_MAX_BITLEN
-                           && (!src_p || !src_p->prefixlen)) {
-                               adj->router_address6 = prefix->u.prefix6;
-                       }
-                       break;
-               default:
-                       flog_err(EC_LIB_DEVELOPMENT,
-                                "%s: unknown address family [%d]", __func__,
-                                prefix->family);
-                       exit(1);
-               }
                adjinfo2nexthop(prefix->family, rinfo->nexthops, adj, sr,
                                label_stack);
                if (!allow_ecmp)