Make sure that remote address test has a ip mask

master
Pedro Alvarez 4 years ago committed by Andre Puschmann
parent 6ce5863f03
commit b3bfe336a9

@ -75,30 +75,30 @@ public:
bool match(const srslte::unique_byte_buffer_t& pdu);
bool filter_contains(uint16_t filtertype);
uint8_t eps_bearer_id;
uint8_t lcid;
uint8_t id;
uint8_t eval_precedence;
uint32_t active_filters;
uint32_t ipv4_remote_addr;
uint32_t ipv4_remote_addr_mask;
uint32_t ipv4_local_addr;
uint32_t ipv4_local_addr_mask;
uint8_t ipv6_remote_addr[16];
uint8_t ipv6_remote_addr_mask[16];
uint8_t ipv6_remote_addr_length;
uint8_t ipv6_local_addr[16];
uint8_t ipv6_local_addr_mask[16];
uint8_t ipv6_local_addr_length;
uint8_t protocol_id;
uint16_t single_local_port;
uint16_t local_port_range[2];
uint16_t single_remote_port;
uint16_t remote_port_range[2];
uint32_t security_parameter_index;
uint8_t type_of_service;
uint8_t type_of_service_mask;
uint8_t flow_label[3];
uint8_t eps_bearer_id {};
uint8_t lcid = {};
uint8_t id = {};
uint8_t eval_precedence = {};
uint32_t active_filters = {};
uint32_t ipv4_remote_addr = {};
uint32_t ipv4_remote_addr_mask = {};
uint32_t ipv4_local_addr = {};
uint32_t ipv4_local_addr_mask = {};
uint8_t ipv6_remote_addr[16] = {};
uint8_t ipv6_remote_addr_mask[16] = {};
uint8_t ipv6_remote_addr_length = {};
uint8_t ipv6_local_addr[16] = {};
uint8_t ipv6_local_addr_mask[16] = {};
uint8_t ipv6_local_addr_length = {};
uint8_t protocol_id = {};
uint16_t single_local_port = {};
uint16_t local_port_range[2] = {};
uint16_t single_remote_port = {};
uint16_t remote_port_range[2] = {};
uint32_t security_parameter_index = {};
uint8_t type_of_service = {};
uint8_t type_of_service_mask = {};
uint8_t flow_label[3] = {};
srslte::log* log;

@ -330,10 +330,11 @@ int tft_filter_test_ipv4_remote_addr()
// Filter length: 5 bytes
// Filter type: IPv4 local address
// Remote address: 127.0.0.2
uint8_t filter_message[5];
uint8_t filter_size = 5;
uint8_t filter_message[9];
uint8_t filter_size = 9;
filter_message[0] = IPV4_REMOTE_ADDR_TYPE;
inet_pton(AF_INET, "127.0.0.2", &filter_message[1]);
inet_pton(AF_INET, "255.0.0.0", &filter_message[5]);
// Set IP test message
ip_msg1->N_bytes = ip_message_len1;

Loading…
Cancel
Save