Re: [iptables-nftables RFC v3 PATCH 14/16] xtables: Support pure nft expressions for DNAT extension

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

 



Hi Pablo,

This approach results in a fairly large parsing function. Note that
we'll have similar functions in SNAT and DNAT both for ipv4 and ipv6.
We have to find a better way to avoid bloating the existing
extensions.

I agree, SNAT will be 99% same code. So it would be nice to factorize that somewhere.
Maybe some new xtables .c file for common stuff like that.

>+
>+	info = calloc(1, sizeof(struct ipt_natinfo));
>+	if (info == NULL)
>+		return -1;
>+
>+	info = append_range(NULL, &range);
>+	if (user_cb("DNAT", &info->t, user_data) != 0) {
>+		free(info);
>+		return -1;
>+	}
The current kernels only support nat rangesize of 1 element, so no
need for this append_range handling.

Ok thanks for the notice, I followed the way it's currently done in the userspace extension, did not know that it's not supported in kernel.

Tomasz
--
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