diff mbox

[iptables-nftables,v2] nft: arp: inhibate -l option so only a fixed size arhln is in use

Message ID 1383812077-5096-1-git-send-email-tomasz.bursztyka@linux.intel.com
State Accepted
Headers show

Commit Message

Tomasz Bursztyka Nov. 7, 2013, 8:14 a.m. UTC
This is a temporary workaround mechanism until variable interface hardware
address length can be handled through nftables.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
---
 iptables/xtables-arp.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Pablo Neira Ayuso Nov. 8, 2013, 7:39 a.m. UTC | #1
On Thu, Nov 07, 2013 at 10:14:37AM +0200, Tomasz Bursztyka wrote:
> This is a temporary workaround mechanism until variable interface hardware
> address length can be handled through nftables.

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/iptables/xtables-arp.c b/iptables/xtables-arp.c
index 18f285c..5ab0fb4 100644
--- a/iptables/xtables-arp.c
+++ b/iptables/xtables-arp.c
@@ -1145,6 +1145,13 @@  int do_commandarp(struct nft_handle *h, int argc, char *argv[], char **table)
 				   invert);
 			getlength_and_mask(argv[optind - 1], &fw.arp.arhln,
 					   &fw.arp.arhln_mask);
+
+			if (fw.arp.arhln != 6) {
+				xtables_error(PARAMETER_PROBLEM,
+					      "Only harware address length of"
+					      " 6 is supported currently.");
+			}
+
 			break;
 
 		case 8:/* protocol length */