diff options
Diffstat (limited to 'common/VIL/pipeline_arpicmp/pipeline_arpicmp.c')
-rw-r--r-- | common/VIL/pipeline_arpicmp/pipeline_arpicmp.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/common/VIL/pipeline_arpicmp/pipeline_arpicmp.c b/common/VIL/pipeline_arpicmp/pipeline_arpicmp.c index 607d13d1..847e2936 100644 --- a/common/VIL/pipeline_arpicmp/pipeline_arpicmp.c +++ b/common/VIL/pipeline_arpicmp/pipeline_arpicmp.c @@ -70,10 +70,10 @@ struct cmd_arp_add_result { }; -uint16_t str2flowtype(char *string); +uint16_t str2flowtype(const char *string); int parse_flexbytes(const char *q_arg, uint8_t *flexbytes, uint16_t max_num); -enum rte_eth_input_set_field str2inset(char *string); +enum rte_eth_input_set_field str2inset(const char *string); int app_pipeline_arpicmp_entry_dbg(struct app_params *app, uint32_t pipeline_id, uint8_t *msg); @@ -168,6 +168,11 @@ cmd_arp_del_parsed(void *parsed_result, arp_key.filler2 = 0; arp_key.filler3 = 0; struct arp_entry_data *new_arp_data = retrieve_arp_entry(arp_key, STATIC_ARP); + if(new_arp_data == NULL) { + /* KW Fix */ + printf("Retrieve arp returned NULL\n"); + return; + } remove_arp_entry(new_arp_data, &arp_key); } else { struct nd_key_ipv6 nd_key; @@ -177,6 +182,11 @@ cmd_arp_del_parsed(void *parsed_result, nd_key.filler2 = 0; nd_key.filler3 = 0; struct nd_entry_data *new_nd_data = retrieve_nd_entry(nd_key, STATIC_ND); + if(new_nd_data == NULL) { + /* KW Fix */ + printf("Retrieve ND returned NULL\n"); + return; + } remove_nd_entry_ipv6(new_nd_data, &nd_key); } } @@ -960,7 +970,7 @@ cmdline_parse_inst_t cmd_set_fwd_mode = { #if 1 -uint16_t str2flowtype(char *string) +uint16_t str2flowtype(const char *string) { uint8_t i = 0; static const struct { @@ -1450,7 +1460,7 @@ struct cmd_set_hash_input_set_result { }; enum rte_eth_input_set_field -str2inset(char *string) +str2inset(const char *string) { uint16_t i; |