485 |
e.address.ipv4.max = ntohl(*max_address); |
e.address.ipv4.max = ntohl(*max_address); |
486 |
} |
} |
487 |
if (port_group_name) { |
if (port_group_name) { |
488 |
if (!ccs_check_and_save_number(port_group_name, |
if (!ccs_check_and_save_number(port_group_name, &e.port)) |
|
&e.port_is_group, &e.port)) |
|
489 |
goto out; |
goto out; |
490 |
} else { |
} else { |
491 |
e.port.value.min = min_port; |
e.port.values[0] = min_port; |
492 |
e.port.value.max = max_port; |
e.port.values[1] = max_port; |
493 |
} |
} |
494 |
if (is_delete) |
if (is_delete) |
495 |
goto delete; |
goto delete; |
583 |
acl = container_of(ptr, struct ccs_ip_network_acl_record, head); |
acl = container_of(ptr, struct ccs_ip_network_acl_record, head); |
584 |
if (acl->operation_type != operation) |
if (acl->operation_type != operation) |
585 |
continue; |
continue; |
586 |
if (acl->port_is_group) { |
if (!ccs_compare_number_union(port, &acl->port) || |
587 |
if (!ccs_number_matches_group(port, port, |
!ccs_check_condition(&r, ptr)) |
|
acl->port.group)) |
|
|
continue; |
|
|
} else { |
|
|
if (port < acl->port.value.min || |
|
|
acl->port.value.max < port) |
|
|
continue; |
|
|
} |
|
|
if (!ccs_check_condition(&r, ptr)) |
|
588 |
continue; |
continue; |
589 |
if (acl->record_type == IP_RECORD_TYPE_ADDRESS_GROUP) { |
if (acl->record_type == IP_RECORD_TYPE_ADDRESS_GROUP) { |
590 |
if (!ccs_address_matches_group(is_ipv6, address, |
if (!ccs_address_matches_group(is_ipv6, address, |