]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
netfilter: conntrack: remove unused proto arg from netns init functions
authorFlorian Westphal <fw@strlen.de>
Wed, 12 Sep 2018 13:19:12 +0000 (15:19 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 20 Sep 2018 16:03:50 +0000 (18:03 +0200)
Its unused, next patch will remove l4proto->l3proto number to simplify
l4 protocol demuxer lookup.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_conntrack_l4proto.h
net/netfilter/nf_conntrack_proto.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_icmp.c
net/netfilter/nf_conntrack_proto_icmpv6.c
net/netfilter/nf_conntrack_proto_sctp.c
net/netfilter/nf_conntrack_proto_tcp.c
net/netfilter/nf_conntrack_proto_udp.c

index 7fdb4b95bba4cdbe4492b0d02bbaefec48650ba7..420823a8648fee962d77ba59a75aa0f42c477e7d 100644 (file)
@@ -84,7 +84,7 @@ struct nf_conntrack_l4proto {
 #endif
        unsigned int    *net_id;
        /* Init l4proto pernet data */
-       int (*init_net)(struct net *net, u_int16_t proto);
+       int (*init_net)(struct net *net);
 
        /* Return the per-net protocol part. */
        struct nf_proto_net *(*get_net_proto)(struct net *net);
index 4896ba44becb0bf6f6889e2a3e9fd074a694833b..06a182a23d92bc8cbef911554caca0c3ce973b23 100644 (file)
@@ -274,7 +274,7 @@ int nf_ct_l4proto_pernet_register_one(struct net *net,
        struct nf_proto_net *pn = NULL;
 
        if (l4proto->init_net) {
-               ret = l4proto->init_net(net, l4proto->l3proto);
+               ret = l4proto->init_net(net);
                if (ret < 0)
                        goto out;
        }
@@ -988,8 +988,7 @@ int nf_conntrack_proto_pernet_init(struct net *net)
        struct nf_proto_net *pn = nf_ct_l4proto_net(net,
                                        &nf_conntrack_l4proto_generic);
 
-       err = nf_conntrack_l4proto_generic.init_net(net,
-                                       nf_conntrack_l4proto_generic.l3proto);
+       err = nf_conntrack_l4proto_generic.init_net(net);
        if (err < 0)
                return err;
        err = nf_ct_l4proto_register_sysctl(net,
index 1b9e600f707db591949cd6df09513ee38c19d81f..d22852ae2316ba1dc4aad4b90972dcae6462b608 100644 (file)
@@ -812,7 +812,7 @@ static int dccp_kmemdup_sysctl_table(struct net *net, struct nf_proto_net *pn,
        return 0;
 }
 
-static int dccp_init_net(struct net *net, u_int16_t proto)
+static int dccp_init_net(struct net *net)
 {
        struct nf_dccp_net *dn = dccp_pernet(net);
        struct nf_proto_net *pn = &dn->pn;
index fea952518d0d3dfeb834c3c3bd223a47653fc280..4530f76b51bdce4c56fee262293acdda5c13bca3 100644 (file)
@@ -136,7 +136,7 @@ static int generic_kmemdup_sysctl_table(struct nf_proto_net *pn,
        return 0;
 }
 
-static int generic_init_net(struct net *net, u_int16_t proto)
+static int generic_init_net(struct net *net)
 {
        struct nf_generic_net *gn = generic_pernet(net);
        struct nf_proto_net *pn = &gn->pn;
index 0348aa98950ac3ba1421eceb8b4a28c1a38f9c54..810039dcd779f8626e2f59c7599cfca78cbbcd04 100644 (file)
@@ -329,7 +329,7 @@ gre_timeout_nla_policy[CTA_TIMEOUT_GRE_MAX+1] = {
 };
 #endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
 
-static int gre_init_net(struct net *net, u_int16_t proto)
+static int gre_init_net(struct net *net)
 {
        struct netns_proto_gre *net_gre = gre_pernet(net);
        int i;
index 2c981622b6745749c640a90330ea7b55fbd9ff29..a9d2769f72d85b3abaa6cafb848a3a8c9993c2ca 100644 (file)
@@ -332,7 +332,7 @@ static int icmp_kmemdup_sysctl_table(struct nf_proto_net *pn,
        return 0;
 }
 
-static int icmp_init_net(struct net *net, u_int16_t proto)
+static int icmp_init_net(struct net *net)
 {
        struct nf_icmp_net *in = icmp_pernet(net);
        struct nf_proto_net *pn = &in->pn;
index effac451c7e0595e81b2264686eb74cd09d78cfa..8a88db599d663e18d9e663dc9dd4c612376aee0a 100644 (file)
@@ -343,7 +343,7 @@ static int icmpv6_kmemdup_sysctl_table(struct nf_proto_net *pn,
        return 0;
 }
 
-static int icmpv6_init_net(struct net *net, u_int16_t proto)
+static int icmpv6_init_net(struct net *net)
 {
        struct nf_icmp_net *in = icmpv6_pernet(net);
        struct nf_proto_net *pn = &in->pn;
index 7d7eb18f658b12de9baf767391e5a74708d8fef9..9cf59ab280c03c9e55c14d85aa2c5e803187ee35 100644 (file)
@@ -734,7 +734,7 @@ static int sctp_kmemdup_sysctl_table(struct nf_proto_net *pn,
        return 0;
 }
 
-static int sctp_init_net(struct net *net, u_int16_t proto)
+static int sctp_init_net(struct net *net)
 {
        struct nf_sctp_net *sn = sctp_pernet(net);
        struct nf_proto_net *pn = &sn->pn;
index 14a1a9348fccca9433412a2e6e7c169824c19cc5..f4954fa7be2570323da124f77b2a968ac26da76d 100644 (file)
@@ -1506,7 +1506,7 @@ static int tcp_kmemdup_sysctl_table(struct nf_proto_net *pn,
        return 0;
 }
 
-static int tcp_init_net(struct net *net, u_int16_t proto)
+static int tcp_init_net(struct net *net)
 {
        struct nf_tcp_net *tn = tcp_pernet(net);
        struct nf_proto_net *pn = &tn->pn;
index da94c967c835d8a9af0bd5f9c17c0a683eff656d..4645bf5b20c8f5ce7929f9d6b3196d9824f51c95 100644 (file)
@@ -290,7 +290,7 @@ static int udp_kmemdup_sysctl_table(struct nf_proto_net *pn,
        return 0;
 }
 
-static int udp_init_net(struct net *net, u_int16_t proto)
+static int udp_init_net(struct net *net)
 {
        struct nf_udp_net *un = udp_pernet(net);
        struct nf_proto_net *pn = &un->pn;