From a04ebb88e5fd726a9d343cc288c1858e69cf7872 Mon Sep 17 00:00:00 2001 From: zhanglimao Date: Wed, 13 Mar 2019 10:36:54 +0800 Subject: [PATCH] session rule cli add udp session fail current session rule cli can not add session rule of proto is udp. because vnet_session_rule_add_del function's paramter does not include transport_proto element in args struct, but session rule type on the basis of input args's transport_proto when create session rule with vnet_session_rule_add_del function, so just add transport_proto element to vnet_session_rule_add_del function's args that to solve this problem Change-Id: If1a5942b4a0b006d73376e0cb01b97e84c593493 Signed-off-by: zhanglimao --- src/vnet/session/session_lookup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vnet/session/session_lookup.c b/src/vnet/session/session_lookup.c index 1d9662caf0f..b74973d726b 100644 --- a/src/vnet/session/session_lookup.c +++ b/src/vnet/session/session_lookup.c @@ -1489,6 +1489,7 @@ session_rule_command_fn (vlib_main_t * vm, unformat_input_t * input, fib_proto = is_ip4 ? FIB_PROTOCOL_IP4 : FIB_PROTOCOL_IP6; session_rule_add_del_args_t args = { + .transport_proto = proto, .table_args.lcl.fp_addr = lcl_ip, .table_args.lcl.fp_len = lcl_plen, .table_args.lcl.fp_proto = fib_proto, -- 2.16.6