aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/srv6
diff options
context:
space:
mode:
authorTetsuya Murakami <tetsuya.mrk@gmail.com>2020-03-21 14:47:02 -0700
committerTetsuya Murakami <tetsuya.mrk@gmail.com>2020-03-21 14:47:02 -0700
commit0d90ed92cf80a03da6dbd2cb655dc1718c552549 (patch)
treeaaa79e22498a2a267457c52000fda739d513b441 /src/vnet/srv6
parent9e722bd466383dd53b10d4c1de95ad18db939147 (diff)
srv6-mobile: Fix the localsid length issue on vnet/srv6
Fix the following issue. 1. The localsid length was not stored in sr localsid structure. 2. SRv6 mobile test cases were modified based on the new sr localsid CLI syntax. Type: fix Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com> Change-Id: Ieb7620c35439e90a599802a7e0dba61a39707349
Diffstat (limited to 'src/vnet/srv6')
-rwxr-xr-xsrc/vnet/srv6/sr_localsid.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/vnet/srv6/sr_localsid.c b/src/vnet/srv6/sr_localsid.c
index 2e8b10d2987..6af6b7497bd 100755
--- a/src/vnet/srv6/sr_localsid.c
+++ b/src/vnet/srv6/sr_localsid.c
@@ -144,6 +144,11 @@ sr_cli_localsid (char is_del, ip6_address_t * localsid_addr,
pref_length = plugin->prefix_length;
}
+ if (localsid_prefix_len != 0)
+ {
+ pref_length = localsid_prefix_len;
+ }
+
/* Check whether there exists a FIB entry with such address */
fib_prefix_t pfx = {
.fp_proto = FIB_PROTOCOL_IP6,
@@ -152,11 +157,7 @@ sr_cli_localsid (char is_del, ip6_address_t * localsid_addr,
pfx.fp_addr.as_u64[0] = localsid_addr->as_u64[0];
pfx.fp_addr.as_u64[1] = localsid_addr->as_u64[1];
-
- if (pref_length != 0)
- {
- pfx.fp_len = pref_length;
- }
+ pfx.fp_len = pref_length;
/* Lookup the FIB index associated to the table id provided */
u32 fib_index = fib_table_find (FIB_PROTOCOL_IP6, fib_table);