session rule cli add udp session fail 29/18229/2
authorzhanglimao <zhanglimao0017@gmail.com>
Wed, 13 Mar 2019 02:36:54 +0000 (10:36 +0800)
committerFlorin Coras <florin.coras@gmail.com>
Wed, 13 Mar 2019 22:52:55 +0000 (22:52 +0000)
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 <zhanglimao0017@gmail.com>
src/vnet/session/session_lookup.c

index 1d9662c..b74973d 100644 (file)
@@ -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,