• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/net/ipv4/netfilter/

Lines Matching defs:range

122  * that meet the constraints of range. */
125 const struct nf_nat_range *range)
131 range specified, otherwise let this drag us onto a new src IP. */
132 if (range->flags & IP_NAT_RANGE_MAP_IPS) {
133 if (ntohl(tuple->src.u3.ip) < ntohl(range->min_ip) ||
134 ntohl(tuple->src.u3.ip) > ntohl(range->max_ip))
140 if (!(range->flags & IP_NAT_RANGE_PROTO_SPECIFIED) ||
142 &range->min, &range->max))
166 const struct nf_nat_range *range)
182 if (in_range(result, range)) {
194 if the range specifies 1.2.3.4 ports 10000-10005 and 1.2.3.5 ports
200 const struct nf_nat_range *range,
209 if (!(range->flags & IP_NAT_RANGE_MAP_IPS))
218 if (range->min_ip == range->max_ip) {
219 *var_ipp = range->min_ip;
229 minip = ntohl(range->min_ip);
230 maxip = ntohl(range->max_ip);
232 range->flags & IP_NAT_RANGE_PERSISTENT ?
238 /* Manipulate the tuple into the range given. For NF_INET_POST_ROUTING,
239 * we change the source to map into the range. For NF_INET_PRE_ROUTING
241 * range. It might not be possible to get a unique tuple, but we try.
247 const struct nf_nat_range *range,
257 range, use that.
263 !(range->flags & IP_NAT_RANGE_PROTO_RANDOM)) {
264 if (find_appropriate_src(net, zone, orig_tuple, tuple, range)) {
272 range. */
274 find_best_ips_proto(zone, tuple, range, ct, maniptype);
277 the range to make a unique tuple. */
282 /* Only bother mapping if it's not already in range and unique */
283 if (!(range->flags & IP_NAT_RANGE_PROTO_RANDOM) &&
284 (!(range->flags & IP_NAT_RANGE_PROTO_SPECIFIED) ||
285 proto->in_range(tuple, maniptype, &range->min, &range->max)) &&
290 proto->unique_tuple(tuple, range, maniptype, ct);
297 const struct nf_nat_range *range,
327 get_unique_tuple(&new_tuple, &curr_tuple, range, ct, maniptype);
621 struct nf_nat_range *range)
633 err = npt->nlattr_to_range(tb, range);
645 const struct nf_conn *ct, struct nf_nat_range *range)
650 memset(range, 0, sizeof(*range));
657 range->min_ip = nla_get_be32(tb[CTA_NAT_MINIP]);
660 range->max_ip = range->min_ip;
662 range->max_ip = nla_get_be32(tb[CTA_NAT_MAXIP]);
664 if (range->min_ip)
665 range->flags |= IP_NAT_RANGE_MAP_IPS;
670 err = nfnetlink_parse_nat_proto(tb[CTA_NAT_PROTO], ct, range);
682 struct nf_nat_range range;
684 if (nfnetlink_parse_nat(attr, ct, &range) < 0)
689 return nf_nat_setup_info(ct, &range, manip);