summaryrefslogtreecommitdiffstats
path: root/iptables/xshared.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2023-11-16 17:03:10 +0100
committerPhil Sutter <phil@nwl.cc>2023-11-23 17:59:42 +0100
commit267f83f5e1b3fb5b82973c154c8b445701be0a58 (patch)
treea926ad354bfb868d4ac64614248685f51e6a0ba7 /iptables/xshared.c
parentdd38b9a85195c008cc1462e3b24c333be175efc3 (diff)
xshared: Drop pointless CMD_REPLACE check
All current users set default source and destination addresses in their post_parse callbacks, so legacy variants are safe and nft variants don't have this restriction anyway. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/xshared.c')
-rw-r--r--iptables/xshared.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/iptables/xshared.c b/iptables/xshared.c
index 53e72b7a..c4d7a266 100644
--- a/iptables/xshared.c
+++ b/iptables/xshared.c
@@ -1836,11 +1836,6 @@ void do_parse(int argc, char *argv[],
if (p->ops->post_parse)
p->ops->post_parse(p->command, cs, args);
- if (p->command == CMD_REPLACE &&
- (args->s.naddrs != 1 || args->d.naddrs != 1))
- xtables_error(PARAMETER_PROBLEM, "Replacement rule does not "
- "specify a unique address");
-
generic_opt_check(p->command, cs->options);
if (p->chain != NULL && strlen(p->chain) >= XT_EXTENSION_MAXNAMELEN)