Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netfilter: conntrack: remove unused proto arg from netns init functions

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>

authored by

Florian Westphal and committed by
Pablo Neira Ayuso
ca2ca6e1 6fe78fa4

+11 -12
+1 -1
include/net/netfilter/nf_conntrack_l4proto.h
··· 84 84 #endif 85 85 unsigned int *net_id; 86 86 /* Init l4proto pernet data */ 87 - int (*init_net)(struct net *net, u_int16_t proto); 87 + int (*init_net)(struct net *net); 88 88 89 89 /* Return the per-net protocol part. */ 90 90 struct nf_proto_net *(*get_net_proto)(struct net *net);
+2 -3
net/netfilter/nf_conntrack_proto.c
··· 274 274 struct nf_proto_net *pn = NULL; 275 275 276 276 if (l4proto->init_net) { 277 - ret = l4proto->init_net(net, l4proto->l3proto); 277 + ret = l4proto->init_net(net); 278 278 if (ret < 0) 279 279 goto out; 280 280 } ··· 988 988 struct nf_proto_net *pn = nf_ct_l4proto_net(net, 989 989 &nf_conntrack_l4proto_generic); 990 990 991 - err = nf_conntrack_l4proto_generic.init_net(net, 992 - nf_conntrack_l4proto_generic.l3proto); 991 + err = nf_conntrack_l4proto_generic.init_net(net); 993 992 if (err < 0) 994 993 return err; 995 994 err = nf_ct_l4proto_register_sysctl(net,
+1 -1
net/netfilter/nf_conntrack_proto_dccp.c
··· 812 812 return 0; 813 813 } 814 814 815 - static int dccp_init_net(struct net *net, u_int16_t proto) 815 + static int dccp_init_net(struct net *net) 816 816 { 817 817 struct nf_dccp_net *dn = dccp_pernet(net); 818 818 struct nf_proto_net *pn = &dn->pn;
+1 -1
net/netfilter/nf_conntrack_proto_generic.c
··· 136 136 return 0; 137 137 } 138 138 139 - static int generic_init_net(struct net *net, u_int16_t proto) 139 + static int generic_init_net(struct net *net) 140 140 { 141 141 struct nf_generic_net *gn = generic_pernet(net); 142 142 struct nf_proto_net *pn = &gn->pn;
+1 -1
net/netfilter/nf_conntrack_proto_gre.c
··· 329 329 }; 330 330 #endif /* CONFIG_NF_CONNTRACK_TIMEOUT */ 331 331 332 - static int gre_init_net(struct net *net, u_int16_t proto) 332 + static int gre_init_net(struct net *net) 333 333 { 334 334 struct netns_proto_gre *net_gre = gre_pernet(net); 335 335 int i;
+1 -1
net/netfilter/nf_conntrack_proto_icmp.c
··· 332 332 return 0; 333 333 } 334 334 335 - static int icmp_init_net(struct net *net, u_int16_t proto) 335 + static int icmp_init_net(struct net *net) 336 336 { 337 337 struct nf_icmp_net *in = icmp_pernet(net); 338 338 struct nf_proto_net *pn = &in->pn;
+1 -1
net/netfilter/nf_conntrack_proto_icmpv6.c
··· 343 343 return 0; 344 344 } 345 345 346 - static int icmpv6_init_net(struct net *net, u_int16_t proto) 346 + static int icmpv6_init_net(struct net *net) 347 347 { 348 348 struct nf_icmp_net *in = icmpv6_pernet(net); 349 349 struct nf_proto_net *pn = &in->pn;
+1 -1
net/netfilter/nf_conntrack_proto_sctp.c
··· 734 734 return 0; 735 735 } 736 736 737 - static int sctp_init_net(struct net *net, u_int16_t proto) 737 + static int sctp_init_net(struct net *net) 738 738 { 739 739 struct nf_sctp_net *sn = sctp_pernet(net); 740 740 struct nf_proto_net *pn = &sn->pn;
+1 -1
net/netfilter/nf_conntrack_proto_tcp.c
··· 1506 1506 return 0; 1507 1507 } 1508 1508 1509 - static int tcp_init_net(struct net *net, u_int16_t proto) 1509 + static int tcp_init_net(struct net *net) 1510 1510 { 1511 1511 struct nf_tcp_net *tn = tcp_pernet(net); 1512 1512 struct nf_proto_net *pn = &tn->pn;
+1 -1
net/netfilter/nf_conntrack_proto_udp.c
··· 290 290 return 0; 291 291 } 292 292 293 - static int udp_init_net(struct net *net, u_int16_t proto) 293 + static int udp_init_net(struct net *net) 294 294 { 295 295 struct nf_udp_net *un = udp_pernet(net); 296 296 struct nf_proto_net *pn = &un->pn;