netfilter: xtables: remove some goto
Combining two ifs, and goto is easily gone. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
This commit is contained in:
parent
a1ff4ac84e
commit
9452258d81
@ -359,15 +359,12 @@ ipt_do_table(struct sk_buff *skb,
|
||||
IP_NF_ASSERT(e);
|
||||
IP_NF_ASSERT(back);
|
||||
if (!ip_packet_match(ip, indev, outdev,
|
||||
&e->ip, mtpar.fragoff)) {
|
||||
no_match:
|
||||
&e->ip, mtpar.fragoff) ||
|
||||
IPT_MATCH_ITERATE(e, do_match, skb, &mtpar) != 0) {
|
||||
e = ipt_next_entry(e);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (IPT_MATCH_ITERATE(e, do_match, skb, &mtpar) != 0)
|
||||
goto no_match;
|
||||
|
||||
ADD_COUNTER(e->counters, ntohs(ip->tot_len), 1);
|
||||
|
||||
t = ipt_get_target(e);
|
||||
|
@ -386,15 +386,12 @@ ip6t_do_table(struct sk_buff *skb,
|
||||
IP_NF_ASSERT(e);
|
||||
IP_NF_ASSERT(back);
|
||||
if (!ip6_packet_match(skb, indev, outdev, &e->ipv6,
|
||||
&mtpar.thoff, &mtpar.fragoff, &hotdrop)) {
|
||||
no_match:
|
||||
&mtpar.thoff, &mtpar.fragoff, &hotdrop) ||
|
||||
IP6T_MATCH_ITERATE(e, do_match, skb, &mtpar) != 0) {
|
||||
e = ip6t_next_entry(e);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (IP6T_MATCH_ITERATE(e, do_match, skb, &mtpar) != 0)
|
||||
goto no_match;
|
||||
|
||||
ADD_COUNTER(e->counters,
|
||||
ntohs(ipv6_hdr(skb)->payload_len) +
|
||||
sizeof(struct ipv6hdr), 1);
|
||||
|
Loading…
Reference in New Issue
Block a user