diff options
author | Patrick McHardy <kaber@trash.net> | 2007-04-18 14:00:11 +0000 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2007-04-18 14:00:11 +0000 |
commit | 9c67defe98f04f72f19dfd09c8030e1de4b8bf0f (patch) | |
tree | 889eff4944055c8e7ba12f31ff82549d1fd70db3 /extensions/libipt_MASQUERADE.c | |
parent | e656e265bc67a55f6e51aa07118f96c058a97798 (diff) |
Fix iptables-save with --random option
Diffstat (limited to 'extensions/libipt_MASQUERADE.c')
-rw-r--r-- | extensions/libipt_MASQUERADE.c | 5 |
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, |