Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b91c96c authored by Davide Caratti's avatar Davide Caratti Committed by Pablo Neira Ayuso
Browse files

netfilter: conntrack: built-in support for UDPlite



CONFIG_NF_CT_PROTO_UDPLITE is no more a tristate. When set to y,
connection tracking support for UDPlite protocol is built-in into
nf_conntrack.ko.

footprint test:
$ ls -l net/netfilter/nf_conntrack{_proto_udplite,}.ko \
        net/ipv4/netfilter/nf_conntrack_ipv4.ko \
        net/ipv6/netfilter/nf_conntrack_ipv6.ko

(builtin)|| udplite|  ipv4  |  ipv6  |nf_conntrack
---------++--------+--------+--------+--------------
none     || 432538 | 828755 | 828676 | 6141434
UDPlite  ||   -    | 829649 | 829362 | 6498204

Signed-off-by: default avatarDavide Caratti <dcaratti@redhat.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent a85406af
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -21,6 +21,9 @@ extern struct nf_conntrack_l4proto nf_conntrack_l4proto_dccp4;
#ifdef CONFIG_NF_CT_PROTO_SCTP
#ifdef CONFIG_NF_CT_PROTO_SCTP
extern struct nf_conntrack_l4proto nf_conntrack_l4proto_sctp4;
extern struct nf_conntrack_l4proto nf_conntrack_l4proto_sctp4;
#endif
#endif
#ifdef CONFIG_NF_CT_PROTO_UDPLITE
extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udplite4;
#endif


int nf_conntrack_ipv4_compat_init(void);
int nf_conntrack_ipv4_compat_init(void);
void nf_conntrack_ipv4_compat_fini(void);
void nf_conntrack_ipv4_compat_fini(void);
+3 −0
Original line number Original line Diff line number Diff line
@@ -12,6 +12,9 @@ extern struct nf_conntrack_l4proto nf_conntrack_l4proto_dccp6;
#ifdef CONFIG_NF_CT_PROTO_SCTP
#ifdef CONFIG_NF_CT_PROTO_SCTP
extern struct nf_conntrack_l4proto nf_conntrack_l4proto_sctp6;
extern struct nf_conntrack_l4proto nf_conntrack_l4proto_sctp6;
#endif
#endif
#ifdef CONFIG_NF_CT_PROTO_UDPLITE
extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udplite6;
#endif


#include <linux/sysctl.h>
#include <linux/sysctl.h>
extern struct ctl_table nf_ct_ipv6_sysctl_table[];
extern struct ctl_table nf_ct_ipv6_sysctl_table[];
+16 −0
Original line number Original line Diff line number Diff line
@@ -69,6 +69,19 @@ struct nf_sctp_net {
};
};
#endif
#endif


#ifdef CONFIG_NF_CT_PROTO_UDPLITE
enum udplite_conntrack {
	UDPLITE_CT_UNREPLIED,
	UDPLITE_CT_REPLIED,
	UDPLITE_CT_MAX
};

struct nf_udplite_net {
	struct nf_proto_net pn;
	unsigned int timeouts[UDPLITE_CT_MAX];
};
#endif

struct nf_ip_net {
struct nf_ip_net {
	struct nf_generic_net   generic;
	struct nf_generic_net   generic;
	struct nf_tcp_net	tcp;
	struct nf_tcp_net	tcp;
@@ -81,6 +94,9 @@ struct nf_ip_net {
#ifdef CONFIG_NF_CT_PROTO_SCTP
#ifdef CONFIG_NF_CT_PROTO_SCTP
	struct nf_sctp_net	sctp;
	struct nf_sctp_net	sctp;
#endif
#endif
#ifdef CONFIG_NF_CT_PROTO_UDPLITE
	struct nf_udplite_net	udplite;
#endif
};
};


struct ct_pcpu {
struct ct_pcpu {
+3 −0
Original line number Original line Diff line number Diff line
@@ -346,6 +346,9 @@ static struct nf_conntrack_l4proto *builtin_l4proto4[] = {
#ifdef CONFIG_NF_CT_PROTO_SCTP
#ifdef CONFIG_NF_CT_PROTO_SCTP
	&nf_conntrack_l4proto_sctp4,
	&nf_conntrack_l4proto_sctp4,
#endif
#endif
#ifdef CONFIG_NF_CT_PROTO_UDPLITE
	&nf_conntrack_l4proto_udplite4,
#endif
};
};


static int ipv4_net_init(struct net *net)
static int ipv4_net_init(struct net *net)
+3 −0
Original line number Original line Diff line number Diff line
@@ -346,6 +346,9 @@ static struct nf_conntrack_l4proto *builtin_l4proto6[] = {
#ifdef CONFIG_NF_CT_PROTO_SCTP
#ifdef CONFIG_NF_CT_PROTO_SCTP
	&nf_conntrack_l4proto_sctp6,
	&nf_conntrack_l4proto_sctp6,
#endif
#endif
#ifdef CONFIG_NF_CT_PROTO_UDPLITE
	&nf_conntrack_l4proto_udplite6,
#endif
};
};


static int ipv6_net_init(struct net *net)
static int ipv6_net_init(struct net *net)
Loading