From 3dd81c0e4a06b71db1df6f944e57d1bfa06d797b Mon Sep 17 00:00:00 2001 From: Steven Luong Date: Wed, 7 Aug 2024 10:53:48 -0700 Subject: 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 --- src/vnet/session/session_api.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit 1.2.3-korg