/Linux-v6.1/net/netfilter/ipset/ |
D | ip_set_hash_ip.c | 105 u32 ip = 0, ip_to = 0, hosts; in hash_ip4_uadt() local 130 ip_to = ip; in hash_ip4_uadt() 132 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_ip4_uadt() 135 if (ip > ip_to) { in hash_ip4_uadt() 136 if (ip_to == 0) in hash_ip4_uadt() 138 swap(ip, ip_to); in hash_ip4_uadt() 145 ip_set_mask_from_to(ip, ip_to, cidr); in hash_ip4_uadt() 151 if (((u64)ip_to - ip + 1) >> (32 - h->netmask) > IPSET_MAX_RANGE) in hash_ip4_uadt() 156 for (; ip <= ip_to;) { in hash_ip4_uadt()
|
D | ip_set_hash_ipmark.c | 104 u32 ip, ip_to = 0; in hash_ipmark4_uadt() local 133 ip_to = ip = ntohl(e.ip); in hash_ipmark4_uadt() 135 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_ipmark4_uadt() 138 if (ip > ip_to) { in hash_ipmark4_uadt() 139 if (e.mark == 0 && ip_to == 0) in hash_ipmark4_uadt() 141 swap(ip, ip_to); in hash_ipmark4_uadt() 148 ip_set_mask_from_to(ip, ip_to, cidr); in hash_ipmark4_uadt() 151 if (((u64)ip_to - ip + 1) > IPSET_MAX_RANGE) in hash_ipmark4_uadt() 156 for (; ip <= ip_to; ip++) { in hash_ipmark4_uadt()
|
D | ip_set_hash_net.c | 143 u32 ip = 0, ip_to = 0, ipn, n = 0; in hash_net4_uadt() local 181 ip_to = ip; in hash_net4_uadt() 183 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_net4_uadt() 186 if (ip_to < ip) in hash_net4_uadt() 187 swap(ip, ip_to); in hash_net4_uadt() 188 if (ip + UINT_MAX == ip_to) in hash_net4_uadt() 193 ipn = ip_set_range_to_cidr(ipn, ip_to, &e.cidr); in hash_net4_uadt() 195 } while (ipn++ < ip_to); in hash_net4_uadt() 204 ip = ip_set_range_to_cidr(ip, ip_to, &e.cidr); in hash_net4_uadt() 210 } while (ip++ < ip_to); in hash_net4_uadt()
|
D | ip_set_hash_netnet.c | 170 u32 ip = 0, ip_to = 0; in hash_netnet4_uadt() local 223 ip_to = ip; in hash_netnet4_uadt() 225 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_netnet4_uadt() 228 if (ip_to < ip) in hash_netnet4_uadt() 229 swap(ip, ip_to); in hash_netnet4_uadt() 230 if (unlikely(ip + UINT_MAX == ip_to)) in hash_netnet4_uadt() 233 ip_set_mask_from_to(ip, ip_to, e.cidr[0]); in hash_netnet4_uadt() 250 ipn = ip_set_range_to_cidr(ipn, ip_to, &e.cidr[0]); in hash_netnet4_uadt() 252 } while (ipn++ < ip_to); in hash_netnet4_uadt() 271 ip = ip_set_range_to_cidr(ip, ip_to, &e.cidr[0]); in hash_netnet4_uadt() [all …]
|
D | ip_set_bitmap_ip.c | 135 u32 ip = 0, ip_to = 0; in bitmap_ip_uadt() local 163 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in bitmap_ip_uadt() 166 if (ip > ip_to) { in bitmap_ip_uadt() 167 swap(ip, ip_to); in bitmap_ip_uadt() 176 ip_set_mask_from_to(ip, ip_to, cidr); in bitmap_ip_uadt() 178 ip_to = ip; in bitmap_ip_uadt() 181 if (ip_to > map->last_ip) in bitmap_ip_uadt() 184 for (; !before(ip_to, ip); ip += map->hosts) { in bitmap_ip_uadt()
|
D | ip_set_hash_netiface.c | 205 u32 ip = 0, ip_to = 0, ipn, n = 0; in hash_netiface4_uadt() local 249 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_netiface4_uadt() 252 if (ip_to < ip) in hash_netiface4_uadt() 253 swap(ip, ip_to); in hash_netiface4_uadt() 254 if (ip + UINT_MAX == ip_to) in hash_netiface4_uadt() 257 ip_set_mask_from_to(ip, ip_to, e.cidr); in hash_netiface4_uadt() 261 ipn = ip_set_range_to_cidr(ipn, ip_to, &e.cidr); in hash_netiface4_uadt() 263 } while (ipn++ < ip_to); in hash_netiface4_uadt() 272 ip = ip_set_range_to_cidr(ip, ip_to, &e.cidr); in hash_netiface4_uadt() 279 } while (ip++ < ip_to); in hash_netiface4_uadt()
|
D | ip_set_hash_netport.c | 161 u32 port, port_to, p = 0, ip = 0, ip_to = 0, ipn; in hash_netport4_uadt() local 229 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_netport4_uadt() 232 if (ip_to < ip) in hash_netport4_uadt() 233 swap(ip, ip_to); in hash_netport4_uadt() 234 if (ip + UINT_MAX == ip_to) in hash_netport4_uadt() 237 ip_set_mask_from_to(ip, ip_to, e.cidr + 1); in hash_netport4_uadt() 241 ipn = ip_set_range_to_cidr(ipn, ip_to, &cidr); in hash_netport4_uadt() 243 } while (ipn++ < ip_to); in hash_netport4_uadt() 256 ip = ip_set_range_to_cidr(ip, ip_to, &cidr); in hash_netport4_uadt() 267 } while (ip++ < ip_to); in hash_netport4_uadt()
|
D | ip_set_hash_ipport.c | 112 u32 ip, ip_to = 0, p = 0, port, port_to; in hash_ipport4_uadt() local 154 ip_to = ip = ntohl(e.ip); in hash_ipport4_uadt() 156 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_ipport4_uadt() 159 if (ip > ip_to) in hash_ipport4_uadt() 160 swap(ip, ip_to); in hash_ipport4_uadt() 166 ip_set_mask_from_to(ip, ip_to, cidr); in hash_ipport4_uadt() 176 if (((u64)ip_to - ip + 1)*(port_to - port + 1) > IPSET_MAX_RANGE) in hash_ipport4_uadt() 181 for (; ip <= ip_to; ip++) { in hash_ipport4_uadt()
|
D | ip_set_hash_ipportip.c | 115 u32 ip, ip_to = 0, p = 0, port, port_to; in hash_ipportip4_uadt() local 161 ip_to = ip = ntohl(e.ip); in hash_ipportip4_uadt() 163 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_ipportip4_uadt() 166 if (ip > ip_to) in hash_ipportip4_uadt() 167 swap(ip, ip_to); in hash_ipportip4_uadt() 173 ip_set_mask_from_to(ip, ip_to, cidr); in hash_ipportip4_uadt() 183 if (((u64)ip_to - ip + 1)*(port_to - port + 1) > IPSET_MAX_RANGE) in hash_ipportip4_uadt() 188 for (; ip <= ip_to; ip++) { in hash_ipportip4_uadt()
|
D | ip_set_hash_netportnet.c | 184 u32 ip = 0, ip_to = 0, p = 0, port, port_to; in hash_netportnet4_uadt() local 256 ip_to = ip; in hash_netportnet4_uadt() 258 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_netportnet4_uadt() 261 if (ip > ip_to) in hash_netportnet4_uadt() 262 swap(ip, ip_to); in hash_netportnet4_uadt() 263 if (unlikely(ip + UINT_MAX == ip_to)) in hash_netportnet4_uadt() 266 ip_set_mask_from_to(ip, ip_to, e.cidr[0]); in hash_netportnet4_uadt() 290 ipn = ip_set_range_to_cidr(ipn, ip_to, &e.cidr[0]); in hash_netportnet4_uadt() 292 } while (ipn++ < ip_to); in hash_netportnet4_uadt() 313 ip = ip_set_range_to_cidr(ip, ip_to, &e.cidr[0]); in hash_netportnet4_uadt() [all …]
|
D | ip_set_hash_ipportnet.c | 167 u32 ip = 0, ip_to = 0, p = 0, port, port_to; in hash_ipportnet4_uadt() local 234 ip_to = ip; in hash_ipportnet4_uadt() 236 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_ipportnet4_uadt() 239 if (ip > ip_to) in hash_ipportnet4_uadt() 240 swap(ip, ip_to); in hash_ipportnet4_uadt() 246 ip_set_mask_from_to(ip, ip_to, cidr); in hash_ipportnet4_uadt() 256 if (((u64)ip_to - ip + 1)*(port_to - port + 1) > IPSET_MAX_RANGE) in hash_ipportnet4_uadt() 280 for (; ip <= ip_to; ip++) { in hash_ipportnet4_uadt()
|