File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,11 +93,17 @@ int prefix_tags(ipps_context_t *config) {
9393 ip_addr_t dst_ip = ur_get (template_in , data_in , F_DST_IP );
9494 prefix_tag = 0 ;
9595 prefix_tag_dst = 0 ;
96-
97- int src_res = is_from_configured_prefix (config , & src_ip , & prefix_tag );
98- int dst_res = is_from_configured_prefix (config , & dst_ip , & prefix_tag_dst );
96+ int src_res = 0 ;
97+ int dst_res = 0 ;
9998
100- if ((CHECK_SRC_IP && src_res ) || (CHECK_DST_IP && dst_res )) {
99+ if (CHECK_SRC_IP || CHECK_BOTH ){
100+ src_res = is_from_configured_prefix (config , & src_ip , & prefix_tag );
101+ }
102+ if ((!src_res && CHECK_DST_IP ) || CHECK_BOTH ){
103+ dst_res = is_from_configured_prefix (config , & dst_ip , & prefix_tag_dst );
104+ }
105+
106+ if (src_res || dst_res ) {
101107 debug_print ("tagging %d\n" , prefix_tag );
102108 // data_out should have the right size since TRAP_E_FORMAT_CHANGED _had_ to be returned before getting here
103109 ur_copy_fields (template_out , data_out , template_in , data_in );
You can’t perform that action at this time.
0 commit comments