diff mbox series

[nf-next] netfilter: xtables: use ipt_get_target_c instead of ipt_get_target

Message ID 20180413141020.16607-1-ap420073@gmail.com
State Accepted
Delegated to: Pablo Neira
Headers show
Series [nf-next] netfilter: xtables: use ipt_get_target_c instead of ipt_get_target | expand

Commit Message

Taehee Yoo April 13, 2018, 2:10 p.m. UTC
ipt_get_target is used to get struct xt_entry_target
and ipt_get_target_c is used to get const struct xt_entry_target.
However in the ipt_do_table, ipt_get_target is used to get
const struct xt_entry_target. it should be replaced by ipt_get_target_c.

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
---
 net/ipv4/netfilter/ip_tables.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pablo Neira Ayuso April 26, 2018, 10:06 p.m. UTC | #1
On Fri, Apr 13, 2018 at 11:10:20PM +0900, Taehee Yoo wrote:
> ipt_get_target is used to get struct xt_entry_target
> and ipt_get_target_c is used to get const struct xt_entry_target.
> However in the ipt_do_table, ipt_get_target is used to get
> const struct xt_entry_target. it should be replaced by ipt_get_target_c.

Also 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 series

Patch

diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index 44b308d..444f125 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -300,7 +300,7 @@  ipt_do_table(struct sk_buff *skb,
 		counter = xt_get_this_cpu_counter(&e->counters);
 		ADD_COUNTER(*counter, skb->len, 1);
 
-		t = ipt_get_target(e);
+		t = ipt_get_target_c(e);
 		WARN_ON(!t->u.kernel.target);
 
 #if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE)