From 0363995ef12c2377875f9ab60a43b9b601cb2560 Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Thu, 3 Oct 2013 12:52:55 +0300 Subject: xtables: arp: Store target entry properly and compare them relevantly Fixes a segfault issue when deleting a rule. Signed-off-by: Tomasz Bursztyka Signed-off-by: Pablo Neira Ayuso --- iptables/nft-shared.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'iptables/nft-shared.h') diff --git a/iptables/nft-shared.h b/iptables/nft-shared.h index 3d1f433f..7260fddc 100644 --- a/iptables/nft-shared.h +++ b/iptables/nft-shared.h @@ -178,11 +178,11 @@ extern char *opcodes[]; #include -static inline struct xt_entry_target *nft_arp_get_target(struct arpt_entry *fw) +static inline struct xt_entry_target *nft_arp_get_target(struct arpt_entry *fw) { struct xt_entry_target **target; - target = (void *) fw + fw->target_offset; + target = (void *) &fw->elems; return *target; } -- cgit v1.2.3