netfilter: remove unused hooknum arg from packet functions
authorFlorian Westphal <fw@strlen.de>
Tue, 29 Aug 2017 10:04:10 +0000 (12:04 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 4 Sep 2017 11:25:18 +0000 (13:25 +0200)
tested with allmodconfig build.

Signed-off-by: Florian Westphal <fw@strlen.de>
include/net/netfilter/nf_conntrack_l4proto.h
net/ipv4/netfilter/nf_conntrack_proto_icmp.c
net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_proto_dccp.c
net/netfilter/nf_conntrack_proto_generic.c
net/netfilter/nf_conntrack_proto_gre.c
net/netfilter/nf_conntrack_proto_sctp.c
net/netfilter/nf_conntrack_proto_tcp.c
net/netfilter/nf_conntrack_proto_udp.c

index d4933d56809d9239e9c6e78a92424831208f7f3c..738a0307a96bcbc556980e8b28900196e8f72f48 100644 (file)
@@ -43,7 +43,6 @@ struct nf_conntrack_l4proto {
                      unsigned int dataoff,
                      enum ip_conntrack_info ctinfo,
                      u_int8_t pf,
-                     unsigned int hooknum,
                      unsigned int *timeouts);
 
        /* Called when a new connection for this protocol found;
index 434b4e20f6db57af0aaeadf7593475b3de276939..ce108a996316599b0657694f700d5a1a84fc7fab 100644 (file)
@@ -82,7 +82,6 @@ static int icmp_packet(struct nf_conn *ct,
                       unsigned int dataoff,
                       enum ip_conntrack_info ctinfo,
                       u_int8_t pf,
-                      unsigned int hooknum,
                       unsigned int *timeout)
 {
        /* Do not immediately delete the connection after the first
index 43544b975eaeee31afd218493dc5f419b3255298..30e34c4de0031dfa292258cd89eb28dd95061bd3 100644 (file)
@@ -95,7 +95,6 @@ static int icmpv6_packet(struct nf_conn *ct,
                       unsigned int dataoff,
                       enum ip_conntrack_info ctinfo,
                       u_int8_t pf,
-                      unsigned int hooknum,
                       unsigned int *timeout)
 {
        /* Do not immediately delete the connection after the first
@@ -129,8 +128,7 @@ static bool icmpv6_new(struct nf_conn *ct, const struct sk_buff *skb,
 static int
 icmpv6_error_message(struct net *net, struct nf_conn *tmpl,
                     struct sk_buff *skb,
-                    unsigned int icmp6off,
-                    unsigned int hooknum)
+                    unsigned int icmp6off)
 {
        struct nf_conntrack_tuple intuple, origtuple;
        const struct nf_conntrack_tuple_hash *h;
@@ -214,7 +212,7 @@ icmpv6_error(struct net *net, struct nf_conn *tmpl,
        if (icmp6h->icmp6_type >= 128)
                return NF_ACCEPT;
 
-       return icmpv6_error_message(net, tmpl, skb, dataoff, hooknum);
+       return icmpv6_error_message(net, tmpl, skb, dataoff);
 }
 
 #if IS_ENABLED(CONFIG_NF_CT_NETLINK)
index c23df7c9cd598a0960158c0fc0a78f9079f950b5..ee5555dd7ebce3cc0e48a6b15d212149338bc553 100644 (file)
@@ -1414,7 +1414,7 @@ repeat:
        /* Decide what timeout policy we want to apply to this flow. */
        timeouts = nf_ct_timeout_lookup(net, ct, l4proto);
 
-       ret = l4proto->packet(ct, skb, dataoff, ctinfo, pf, hooknum, timeouts);
+       ret = l4proto->packet(ct, skb, dataoff, ctinfo, pf, timeouts);
        if (ret <= 0) {
                /* Invalid: inverse of the return code tells
                 * the netfilter core what to do */
index 188347571fc78a29da8b57e62b518ca90e19da67..0f5a4d79f6b85637277371f1705c04b9235f2324 100644 (file)
@@ -469,7 +469,7 @@ static unsigned int *dccp_get_timeouts(struct net *net)
 
 static int dccp_packet(struct nf_conn *ct, const struct sk_buff *skb,
                       unsigned int dataoff, enum ip_conntrack_info ctinfo,
-                      u_int8_t pf, unsigned int hooknum,
+                      u_int8_t pf,
                       unsigned int *timeouts)
 {
        struct net *net = nf_ct_net(ct);
index 2993995b690db249e08fd6922ad9306126c0f27e..9cd40700842e6c6aeb254c6b2583f610d51db393 100644 (file)
@@ -61,7 +61,6 @@ static int generic_packet(struct nf_conn *ct,
                          unsigned int dataoff,
                          enum ip_conntrack_info ctinfo,
                          u_int8_t pf,
-                         unsigned int hooknum,
                          unsigned int *timeout)
 {
        nf_ct_refresh_acct(ct, ctinfo, skb, *timeout);
index c0e3a23ac23a4c2fa6f296d0bb750a22c4181534..09a90484c27d585bfca7d4761f68a58afb15a2b0 100644 (file)
@@ -245,7 +245,6 @@ static int gre_packet(struct nf_conn *ct,
                      unsigned int dataoff,
                      enum ip_conntrack_info ctinfo,
                      u_int8_t pf,
-                     unsigned int hooknum,
                      unsigned int *timeouts)
 {
        /* If we've seen traffic both ways, this is a GRE connection.
index 890b5c73368db811756ffa25c07b0236f11c3c37..6303a88af12b0b5116b9808ac9c0ac370bcb33e6 100644 (file)
@@ -307,7 +307,6 @@ static int sctp_packet(struct nf_conn *ct,
                       unsigned int dataoff,
                       enum ip_conntrack_info ctinfo,
                       u_int8_t pf,
-                      unsigned int hooknum,
                       unsigned int *timeouts)
 {
        enum sctp_conntrack new_state, old_state;
index 33c52d9ab2f52ac7f190b92a6e55d33ecf8f6a88..cba1c6ffe51aff7bbdf3ef0ee0cff350881dbf7a 100644 (file)
@@ -803,7 +803,6 @@ static int tcp_packet(struct nf_conn *ct,
                      unsigned int dataoff,
                      enum ip_conntrack_info ctinfo,
                      u_int8_t pf,
-                     unsigned int hooknum,
                      unsigned int *timeouts)
 {
        struct net *net = nf_ct_net(ct);
index dcf3030d22263aed46aa37c65f6d0d04ccc5e174..8af734cd1a946be575c6cb55b662a754b5d5ca84 100644 (file)
@@ -74,7 +74,6 @@ static int udp_packet(struct nf_conn *ct,
                      unsigned int dataoff,
                      enum ip_conntrack_info ctinfo,
                      u_int8_t pf,
-                     unsigned int hooknum,
                      unsigned int *timeouts)
 {
        /* If we've seen traffic both ways, this is some kind of UDP