diff --git a/oaf/src/app_filter.c b/oaf/src/app_filter.c index cf40261..5e90e96 100755 --- a/oaf/src/app_filter.c +++ b/oaf/src/app_filter.c @@ -134,11 +134,14 @@ int __add_app_feature(int appid, if (begin != dict) { strncpy(pos, begin, p - begin); - k_sscanf(pos, "%d:%x",&index, &value); - node->pos_info[node->pos_num].pos = index; - node->pos_info[node->pos_num].value = value; - node->pos_num++; } + else{ + strcpy(pos, dict); + } + k_sscanf(pos, "%d:%x",&index, &value); + node->pos_info[node->pos_num].pos = index; + node->pos_info[node->pos_num].value = value; + node->pos_num++; feature_list_write_lock(); list_add(&(node->head), &af_feature_head); feature_list_write_unlock(); @@ -659,7 +662,8 @@ int af_match_one(flow_info_t *flow, af_feature_node_t *node) AF_ERROR("node or flow is NULL\n"); return AF_FALSE; } - + if (node->proto > 0 && flow->l4_protocol != node->proto) + return AF_FALSE; if (flow->l4_len == 0) return AF_FALSE; diff --git a/oaf/src/app_filter_config.c b/oaf/src/app_filter_config.c index af67fba..023a0d5 100755 --- a/oaf/src/app_filter_config.c +++ b/oaf/src/app_filter_config.c @@ -236,7 +236,6 @@ int af_set_mac_list(cJSON * data_obj) return -1; } if (-1 == mac_to_hex(mac_obj->valuestring, mac_hex)){ - AF_ERROR("mac format error: %s\n", mac_obj->valuestring); continue; } af_mac_add(mac_hex);