Skip to content

Commit dc3c09d

Browse files
TaeheeYooummakynes
authored andcommitted
netfilter: xtables: use ipt_get_target_c instead of ipt_get_target
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 <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent a1d768f commit dc3c09d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv4/netfilter/ip_tables.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ ipt_do_table(struct sk_buff *skb,
300300
counter = xt_get_this_cpu_counter(&e->counters);
301301
ADD_COUNTER(*counter, skb->len, 1);
302302

303-
t = ipt_get_target(e);
303+
t = ipt_get_target_c(e);
304304
WARN_ON(!t->u.kernel.target);
305305

306306
#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE)

0 commit comments

Comments
 (0)