summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_SNAT.c
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/libipt_SNAT.c')
-rw-r--r--extensions/libipt_SNAT.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/extensions/libipt_SNAT.c b/extensions/libipt_SNAT.c
index 74607603..867c9d01 100644
--- a/extensions/libipt_SNAT.c
+++ b/extensions/libipt_SNAT.c
@@ -155,6 +155,13 @@ parse(int c, char **argv, int invert, unsigned int *flags,
exit_error(PARAMETER_PROBLEM,
"Unexpected `!' after --to-source");
+ if (*flags) {
+ if (!kernel_version)
+ get_kernel_version();
+ if (kernel_version > LINUX_VERSION(2, 6, 10))
+ exit_error(PARAMETER_PROBLEM,
+ "Multiple --to-source not supported");
+ }
*target = parse_to(optarg, portok, info);
*flags = 1;
return 1;