Re: [PATCH 07/11] libipt_DNAT: use guided option parser

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 2011-05-18 16:05, Lutz Jaenicke wrote:

>On Wed, May 18, 2011 at 04:00:56PM +0200, Jan Engelhardt wrote:
>> On Wednesday 2011-05-18 15:58, Lutz Jaenicke wrote:
>> 
>> >> +	case O_TO_DEST:
>> >> +		if (cb->xflags & F_TO_DEST) {
>> >>  			if (!kernel_version)
>> >>  				get_kernel_version();
>> >>  			if (kernel_version > LINUX_VERSION(2, 6, 10))
>> >>  				xtables_error(PARAMETER_PROBLEM,
>> >>  					   "Multiple --to-destination not supported");
>> >>  		}
>> >> -		*target = parse_to(optarg, portok, info);
>> >> +		*cb->target = parse_to(cb->arg, portok, info);
>> >>  		/* WTF do we need this for?? */
>> >> -		if (*flags & IPT_DNAT_OPT_RANDOM)
>> >> +		if (cb->xflags & F_RANDOM)
>> >>  			info->mr.range[0].flags |= IP_NAT_RANGE_PROTO_RANDOM;
>> >> -		*flags |= IPT_DNAT_OPT_DEST;
>> >> -		return 1;
>> >
>> >If I understand the logic correctly, cb->xflags will have F_TO_DEST set
>> >if the --to-destination option is found. The additional option parsing
>> >is only performed afterwards such that the (cb->xflags & F_TO_DEST) will
>> >be triggered already on the first and valid call and a "Multiple ... not
>> >supported" will be issued.
>> 
>> Fixed by my most recent submission (run 8), f25b235.
>
>I see. I was working against the git repo...

If it is my repo, that should work.

Live maintainers for upstream iptables seem to have run out 
(in either sense) for the moment.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux