aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
authorSteven Luong <sluong@cisco.com>2024-08-07 10:53:48 -0700
committerFlorin Coras <florin.coras@gmail.com>2024-08-13 17:41:23 +0000
commit3dd81c0e4a06b71db1df6f944e57d1bfa06d797b (patch)
tree070f23e0e5072d644215a4950b51d53d4e94f104 /src/vnet/session
parentd58177c50bb36a712c645fe8c13d126ebadbdc7f (diff)
session: problem in session_rules_details API
Backend needs to return protocol to indicate if the prefix is ip4 or ip6. Type: fix Change-Id: If827c2e8b2a58051298968fa4d69de71ce9c4fcc Signed-off-by: Steven Luong <sluong@cisco.com>
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/session_api.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index 7110029b5dc..8bb38398e3f 100644
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -1019,6 +1019,8 @@ send_session_rule_details4 (mma_rule_16_t * rule, u8 is_local,
ip_set (&rmt.fp_addr, &match->rmt_ip, 1);
lcl.fp_len = ip4_mask_to_preflen (&mask->lcl_ip);
rmt.fp_len = ip4_mask_to_preflen (&mask->rmt_ip);
+ lcl.fp_proto = FIB_PROTOCOL_IP4;
+ rmt.fp_proto = FIB_PROTOCOL_IP4;
ip_prefix_encode (&lcl, &rmp->lcl);
ip_prefix_encode (&rmt, &rmp->rmt);
@@ -1061,6 +1063,8 @@ send_session_rule_details6 (mma_rule_40_t * rule, u8 is_local,
ip_set (&rmt.fp_addr, &match->rmt_ip, 0);
lcl.fp_len = ip6_mask_to_preflen (&mask->lcl_ip);
rmt.fp_len = ip6_mask_to_preflen (&mask->rmt_ip);
+ lcl.fp_proto = FIB_PROTOCOL_IP6;
+ rmt.fp_proto = FIB_PROTOCOL_IP6;
ip_prefix_encode (&lcl, &rmp->lcl);
ip_prefix_encode (&rmt, &rmp->rmt);