Home
last modified time | relevance | path

Searched refs:ip_to (Results 1 – 11 of 11) sorted by relevance

/OK3568_Linux_fs/kernel/net/netfilter/ipset/
H A Dip_set_hash_ip.c104 u32 ip = 0, ip_to = 0, hosts; in hash_ip4_uadt() local
129 ip_to = ip; in hash_ip4_uadt()
131 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_ip4_uadt()
134 if (ip > ip_to) { in hash_ip4_uadt()
135 if (ip_to == 0) in hash_ip4_uadt()
137 swap(ip, ip_to); in hash_ip4_uadt()
144 ip_set_mask_from_to(ip, ip_to, cidr); in hash_ip4_uadt()
150 if (((u64)ip_to - ip + 1) >> (32 - h->netmask) > IPSET_MAX_RANGE) in hash_ip4_uadt()
155 for (; ip <= ip_to;) { in hash_ip4_uadt()
H A Dip_set_hash_ipmark.c103 u32 ip, ip_to = 0; in hash_ipmark4_uadt() local
132 ip_to = ip = ntohl(e.ip); in hash_ipmark4_uadt()
134 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_ipmark4_uadt()
137 if (ip > ip_to) { in hash_ipmark4_uadt()
138 if (e.mark == 0 && ip_to == 0) in hash_ipmark4_uadt()
140 swap(ip, ip_to); in hash_ipmark4_uadt()
147 ip_set_mask_from_to(ip, ip_to, cidr); in hash_ipmark4_uadt()
150 if (((u64)ip_to - ip + 1) > IPSET_MAX_RANGE) in hash_ipmark4_uadt()
155 for (; ip <= ip_to; ip++) { in hash_ipmark4_uadt()
H A Dip_set_hash_net.c142 u32 ip = 0, ip_to = 0, ipn, n = 0; in hash_net4_uadt() local
180 ip_to = ip; in hash_net4_uadt()
182 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_net4_uadt()
185 if (ip_to < ip) in hash_net4_uadt()
186 swap(ip, ip_to); in hash_net4_uadt()
187 if (ip + UINT_MAX == ip_to) in hash_net4_uadt()
192 ipn = ip_set_range_to_cidr(ipn, ip_to, &e.cidr); in hash_net4_uadt()
194 } while (ipn++ < ip_to); in hash_net4_uadt()
203 ip = ip_set_range_to_cidr(ip, ip_to, &e.cidr); in hash_net4_uadt()
209 } while (ip++ < ip_to); in hash_net4_uadt()
H A Dip_set_hash_netnet.c169 u32 ip = 0, ip_to = 0; in hash_netnet4_uadt() local
222 ip_to = ip; in hash_netnet4_uadt()
224 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_netnet4_uadt()
227 if (ip_to < ip) in hash_netnet4_uadt()
228 swap(ip, ip_to); in hash_netnet4_uadt()
229 if (unlikely(ip + UINT_MAX == ip_to)) in hash_netnet4_uadt()
232 ip_set_mask_from_to(ip, ip_to, e.cidr[0]); in hash_netnet4_uadt()
249 ipn = ip_set_range_to_cidr(ipn, ip_to, &e.cidr[0]); in hash_netnet4_uadt()
251 } while (ipn++ < ip_to); in hash_netnet4_uadt()
270 ip = ip_set_range_to_cidr(ip, ip_to, &e.cidr[0]); in hash_netnet4_uadt()
[all …]
H A Dip_set_bitmap_ip.c135 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()
H A Dip_set_hash_netiface.c204 u32 ip = 0, ip_to = 0, ipn, n = 0; in hash_netiface4_uadt() local
248 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_netiface4_uadt()
251 if (ip_to < ip) in hash_netiface4_uadt()
252 swap(ip, ip_to); in hash_netiface4_uadt()
253 if (ip + UINT_MAX == ip_to) in hash_netiface4_uadt()
256 ip_set_mask_from_to(ip, ip_to, e.cidr); in hash_netiface4_uadt()
260 ipn = ip_set_range_to_cidr(ipn, ip_to, &e.cidr); in hash_netiface4_uadt()
262 } while (ipn++ < ip_to); in hash_netiface4_uadt()
271 ip = ip_set_range_to_cidr(ip, ip_to, &e.cidr); in hash_netiface4_uadt()
278 } while (ip++ < ip_to); in hash_netiface4_uadt()
H A Dip_set_hash_netport.c160 u32 port, port_to, p = 0, ip = 0, ip_to = 0, ipn; in hash_netport4_uadt() local
228 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_netport4_uadt()
231 if (ip_to < ip) in hash_netport4_uadt()
232 swap(ip, ip_to); in hash_netport4_uadt()
233 if (ip + UINT_MAX == ip_to) in hash_netport4_uadt()
236 ip_set_mask_from_to(ip, ip_to, e.cidr + 1); in hash_netport4_uadt()
240 ipn = ip_set_range_to_cidr(ipn, ip_to, &cidr); in hash_netport4_uadt()
242 } while (ipn++ < ip_to); in hash_netport4_uadt()
255 ip = ip_set_range_to_cidr(ip, ip_to, &cidr); in hash_netport4_uadt()
266 } while (ip++ < ip_to); in hash_netport4_uadt()
H A Dip_set_hash_ipport.c111 u32 ip, ip_to = 0, p = 0, port, port_to; in hash_ipport4_uadt() local
153 ip_to = ip = ntohl(e.ip); in hash_ipport4_uadt()
155 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_ipport4_uadt()
158 if (ip > ip_to) in hash_ipport4_uadt()
159 swap(ip, ip_to); in hash_ipport4_uadt()
165 ip_set_mask_from_to(ip, ip_to, cidr); in hash_ipport4_uadt()
175 if (((u64)ip_to - ip + 1)*(port_to - port + 1) > IPSET_MAX_RANGE) in hash_ipport4_uadt()
180 for (; ip <= ip_to; ip++) { in hash_ipport4_uadt()
H A Dip_set_hash_netportnet.c183 u32 ip = 0, ip_to = 0, p = 0, port, port_to; in hash_netportnet4_uadt() local
255 ip_to = ip; in hash_netportnet4_uadt()
257 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_netportnet4_uadt()
260 if (ip > ip_to) in hash_netportnet4_uadt()
261 swap(ip, ip_to); in hash_netportnet4_uadt()
262 if (unlikely(ip + UINT_MAX == ip_to)) in hash_netportnet4_uadt()
265 ip_set_mask_from_to(ip, ip_to, e.cidr[0]); in hash_netportnet4_uadt()
289 ipn = ip_set_range_to_cidr(ipn, ip_to, &e.cidr[0]); in hash_netportnet4_uadt()
291 } while (ipn++ < ip_to); in hash_netportnet4_uadt()
312 ip = ip_set_range_to_cidr(ip, ip_to, &e.cidr[0]); in hash_netportnet4_uadt()
[all …]
H A Dip_set_hash_ipportip.c114 u32 ip, ip_to = 0, p = 0, port, port_to; in hash_ipportip4_uadt() local
160 ip_to = ip = ntohl(e.ip); in hash_ipportip4_uadt()
162 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_ipportip4_uadt()
165 if (ip > ip_to) in hash_ipportip4_uadt()
166 swap(ip, ip_to); in hash_ipportip4_uadt()
172 ip_set_mask_from_to(ip, ip_to, cidr); in hash_ipportip4_uadt()
182 if (((u64)ip_to - ip + 1)*(port_to - port + 1) > IPSET_MAX_RANGE) in hash_ipportip4_uadt()
187 for (; ip <= ip_to; ip++) { in hash_ipportip4_uadt()
H A Dip_set_hash_ipportnet.c166 u32 ip = 0, ip_to = 0, p = 0, port, port_to; in hash_ipportnet4_uadt() local
233 ip_to = ip; in hash_ipportnet4_uadt()
235 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_ipportnet4_uadt()
238 if (ip > ip_to) in hash_ipportnet4_uadt()
239 swap(ip, ip_to); in hash_ipportnet4_uadt()
245 ip_set_mask_from_to(ip, ip_to, cidr); in hash_ipportnet4_uadt()
255 if (((u64)ip_to - ip + 1)*(port_to - port + 1) > IPSET_MAX_RANGE) in hash_ipportnet4_uadt()
279 for (; ip <= ip_to; ip++) { in hash_ipportnet4_uadt()