diff options
author | 2021-08-03 16:07:52 +0000 | |
---|---|---|
committer | 2021-10-20 18:17:20 +0000 | |
commit | cfdb15b3724d22d9c74e95ce0e7dabead7dfef45 (patch) | |
tree | f0318e344e7f6978e875af0c2e0139018cf7eb8c /src/vnet/fib/fib_types.h | |
parent | d9e7ac3c9a02083485a898be5e7a977fcffe8a29 (diff) |
ip6: fix IPv6 address calculation error using "ip route add" CLI
Using VPP CLI "ip route add" to add static IPv6 entries outputs wrong
results. Fix this error by correctly calculating IPv6 addresses with
different increased ranges and grouping ip4/ip6 prefix calculation
functionality into two functions.
Type: fix
Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
Reviewed-by: Lijian Zhang <lijian.zhang@arm.com>
Reviewed-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: If954876301ca2095f9331799a086f75db936f246
Diffstat (limited to 'src/vnet/fib/fib_types.h')
-rw-r--r-- | src/vnet/fib/fib_types.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vnet/fib/fib_types.h b/src/vnet/fib/fib_types.h index 55b404b044e..dbd4e97e867 100644 --- a/src/vnet/fib/fib_types.h +++ b/src/vnet/fib/fib_types.h @@ -286,6 +286,11 @@ extern dpo_proto_t fib_proto_to_dpo(fib_protocol_t fib_proto); extern fib_protocol_t dpo_proto_to_fib(dpo_proto_t dpo_proto); /** + * \brief Increase IPv4/IPv6 address according to the prefix length + */ +extern void fib_prefix_increment (fib_prefix_t *pfx); + +/** * Convert from BIER next-hop proto to FIB proto */ extern fib_protocol_t bier_hdr_proto_to_fib(bier_hdr_proto_id_t bproto); |