summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_MASQUERADE.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-04-18 14:00:11 +0000
committerPatrick McHardy <kaber@trash.net>2007-04-18 14:00:11 +0000
commit9c67defe98f04f72f19dfd09c8030e1de4b8bf0f (patch)
tree889eff4944055c8e7ba12f31ff82549d1fd70db3 /extensions/libipt_MASQUERADE.c
parente656e265bc67a55f6e51aa07118f96c058a97798 (diff)
Fix iptables-save with --random option
Diffstat (limited to 'extensions/libipt_MASQUERADE.c')
-rw-r--r--extensions/libipt_MASQUERADE.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/extensions/libipt_MASQUERADE.c b/extensions/libipt_MASQUERADE.c
index 17fc4f60..c24bb321 100644
--- a/extensions/libipt_MASQUERADE.c
+++ b/extensions/libipt_MASQUERADE.c
@@ -138,7 +138,7 @@ print(const struct ipt_ip *ip,
}
if (r->flags & IP_NAT_RANGE_PROTO_RANDOM)
- printf("random");
+ printf("random ");
}
/* Saves the union ipt_targinfo in parsable form to stdout. */
@@ -155,6 +155,9 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target)
printf("-%hu", ntohs(r->max.tcp.port));
printf(" ");
}
+
+ if (r->flags & IP_NAT_RANGE_PROTO_RANDOM)
+ printf("--random ");
}
static struct iptables_target masq = { NULL,