summaryrefslogtreecommitdiffstats
path: root/ospf6d
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2021-07-02 13:52:22 +0200
committerGitHub <noreply@github.com>2021-07-02 13:52:22 +0200
commit0a9fcd96d186bf2bbbb7a9148ced1eeadfbd5e03 (patch)
treecc8582fd1ca1b095f1a917b8c5077ccc392cb114 /ospf6d
parentMerge pull request #8795 from louis-oui/fix-ospf6-router-id (diff)
parent*: Replace 4/16 integers to IPV4_MAX_BYTELEN/IPV6_MAX_BYTELEN (diff)
downloadfrr-0a9fcd96d186bf2bbbb7a9148ced1eeadfbd5e03.tar.xz
frr-0a9fcd96d186bf2bbbb7a9148ced1eeadfbd5e03.zip
Merge pull request #8970 from ton31337/fix/use_IPV6_MAX_BITLEN
*: Do not use 32/128 numbers for prefixlen
Diffstat (limited to 'ospf6d')
-rw-r--r--ospf6d/ospf6_asbr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c
index 1836d81b0..91e33c858 100644
--- a/ospf6d/ospf6_asbr.c
+++ b/ospf6d/ospf6_asbr.c
@@ -556,7 +556,7 @@ void ospf6_asbr_lsa_add(struct ospf6_lsa *lsa)
+ OSPF6_PREFIX_SPACE(external->prefix.prefix_length);
memset(&fwd_addr, 0, sizeof(struct prefix));
fwd_addr.family = AF_INET6;
- fwd_addr.prefixlen = IPV6_MAX_PREFIXLEN;
+ fwd_addr.prefixlen = IPV6_MAX_BITLEN;
memcpy(&fwd_addr.u.prefix6, (caddr_t)external + offset,
sizeof(struct in6_addr));
@@ -1400,7 +1400,7 @@ void ospf6_asbr_redistribute_add(int type, ifindex_t ifindex,
/* create/update binding in external_id_table */
prefix_id.family = AF_INET;
- prefix_id.prefixlen = 32;
+ prefix_id.prefixlen = IPV4_MAX_BITLEN;
prefix_id.u.prefix4.s_addr = htonl(info->id);
node = route_node_get(ospf6->external_id_table, &prefix_id);
node->info = match;
@@ -1465,7 +1465,7 @@ void ospf6_asbr_redistribute_add(int type, ifindex_t ifindex,
/* create/update binding in external_id_table */
prefix_id.family = AF_INET;
- prefix_id.prefixlen = 32;
+ prefix_id.prefixlen = IPV4_MAX_BITLEN;
prefix_id.u.prefix4.s_addr = htonl(info->id);
node = route_node_get(ospf6->external_id_table, &prefix_id);
node->info = route;
@@ -1548,7 +1548,7 @@ void ospf6_asbr_redistribute_remove(int type, ifindex_t ifindex,
/* remove binding in external_id_table */
prefix_id.family = AF_INET;
- prefix_id.prefixlen = 32;
+ prefix_id.prefixlen = IPV4_MAX_BITLEN;
prefix_id.u.prefix4.s_addr = htonl(info->id);
node = route_node_lookup(ospf6->external_id_table, &prefix_id);
assert(node);