]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
netfilter: x_tables: simplify ip{6}table_mangle_hook()
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 24 Jun 2016 17:48:30 +0000 (19:48 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 1 Jul 2016 14:37:02 +0000 (16:37 +0200)
No need for a special case to handle NF_INET_POST_ROUTING, this is
basically the same handling as for prerouting, input, forward.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/iptable_mangle.c
net/ipv6/netfilter/ip6table_mangle.c

index 57fc97cdac700c1c368da47d40270ba7f0b8679f..aebdb337fd7ed2f3ad9ba5b8d30e6d59ff3aa8fc 100644 (file)
@@ -87,10 +87,6 @@ iptable_mangle_hook(void *priv,
 {
        if (state->hook == NF_INET_LOCAL_OUT)
                return ipt_mangle_out(skb, state);
-       if (state->hook == NF_INET_POST_ROUTING)
-               return ipt_do_table(skb, state,
-                                   state->net->ipv4.iptable_mangle);
-       /* PREROUTING/INPUT/FORWARD: */
        return ipt_do_table(skb, state, state->net->ipv4.iptable_mangle);
 }
 
index cb2b28883252562ae834f49c811e940fcbb18ee2..2b1a9dcdbcb3d08e0fe681065efc24748a63bd7a 100644 (file)
@@ -83,10 +83,6 @@ ip6table_mangle_hook(void *priv, struct sk_buff *skb,
 {
        if (state->hook == NF_INET_LOCAL_OUT)
                return ip6t_mangle_out(skb, state);
-       if (state->hook == NF_INET_POST_ROUTING)
-               return ip6t_do_table(skb, state,
-                                    state->net->ipv6.ip6table_mangle);
-       /* INPUT/FORWARD */
        return ip6t_do_table(skb, state, state->net->ipv6.ip6table_mangle);
 }