diff mbox series

[xtables,12/13] arptables: ignore --table argument.

Message ID 20181112141900.7366-13-fw@strlen.de
State Accepted
Delegated to: Pablo Neira
Headers show
Series arptables: make it work | expand

Commit Message

Florian Westphal Nov. 12, 2018, 2:18 p.m. UTC
You can run 'arptables-legacy -t foobar' and commands work fine,
as it still operates on filter table (the only table that exists).

Signed-off-by: Florian Westphal <fw@strlen.de>
---
 iptables/xtables-arp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/iptables/xtables-arp.c b/iptables/xtables-arp.c
index 6a095bfd1629..d0cd68876c99 100644
--- a/iptables/xtables-arp.c
+++ b/iptables/xtables-arp.c
@@ -1191,7 +1191,10 @@  int do_commandarp(struct nft_handle *h, int argc, char *argv[], char **table,
 			if (invert)
 				xtables_error(PARAMETER_PROBLEM,
 					      "unexpected ! flag before --table");
-			*table = argv[optind-1];
+			/* ignore this option.
+			 * arptables-legacy parses it, but libarptc doesn't use it.
+			 * arptables only has a 'filter' table anyway.
+			 */
 			break;
 
 		case 'V':