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

Commit 9c3e1c39 authored by Hannes Eder's avatar Hannes Eder Committed by Patrick McHardy
Browse files

netfilter: xt_ipvs (netfilter matcher for IPVS)



This implements the kernel-space side of the netfilter matcher xt_ipvs.

[ minor fixes by Simon Horman <horms@verge.net.au> ]
Signed-off-by: default avatarHannes Eder <heder@google.com>
Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
[ Patrick: added xt_ipvs.h to Kbuild ]
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent 22cb5166
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ header-y += xt_dscp.h
header-y += xt_esp.h
header-y += xt_hashlimit.h
header-y += xt_iprange.h
header-y += xt_ipvs.h
header-y += xt_helper.h
header-y += xt_length.h
header-y += xt_limit.h
+27 −0
Original line number Diff line number Diff line
#ifndef _XT_IPVS_H
#define _XT_IPVS_H

enum {
	XT_IPVS_IPVS_PROPERTY =	1 << 0, /* all other options imply this one */
	XT_IPVS_PROTO =		1 << 1,
	XT_IPVS_VADDR =		1 << 2,
	XT_IPVS_VPORT =		1 << 3,
	XT_IPVS_DIR =		1 << 4,
	XT_IPVS_METHOD =	1 << 5,
	XT_IPVS_VPORTCTL =	1 << 6,
	XT_IPVS_MASK =		(1 << 7) - 1,
	XT_IPVS_ONCE_MASK =	XT_IPVS_MASK & ~XT_IPVS_IPVS_PROPERTY
};

struct xt_ipvs_mtinfo {
	union nf_inet_addr	vaddr, vmask;
	__be16			vport;
	__u8			l4proto;
	__u8			fwd_method;
	__be16			vportctl;

	__u8			invert;
	__u8			bitmask;
};

#endif /* _XT_IPVS_H */
+10 −0
Original line number Diff line number Diff line
@@ -742,6 +742,16 @@ config NETFILTER_XT_MATCH_IPRANGE

	If unsure, say M.

config NETFILTER_XT_MATCH_IPVS
	tristate '"ipvs" match support'
	depends on IP_VS
	depends on NETFILTER_ADVANCED
	depends on NF_CONNTRACK
	help
	  This option allows you to match against IPVS properties of a packet.

	  If unsure, say N.

config NETFILTER_XT_MATCH_LENGTH
	tristate '"length" match support'
	depends on NETFILTER_ADVANCED
+1 −0
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_HASHLIMIT) += xt_hashlimit.o
obj-$(CONFIG_NETFILTER_XT_MATCH_HELPER) += xt_helper.o
obj-$(CONFIG_NETFILTER_XT_MATCH_HL) += xt_hl.o
obj-$(CONFIG_NETFILTER_XT_MATCH_IPRANGE) += xt_iprange.o
obj-$(CONFIG_NETFILTER_XT_MATCH_IPVS) += xt_ipvs.o
obj-$(CONFIG_NETFILTER_XT_MATCH_LENGTH) += xt_length.o
obj-$(CONFIG_NETFILTER_XT_MATCH_LIMIT) += xt_limit.o
obj-$(CONFIG_NETFILTER_XT_MATCH_MAC) += xt_mac.o
+1 −0
Original line number Diff line number Diff line
@@ -98,6 +98,7 @@ struct ip_vs_protocol * ip_vs_proto_get(unsigned short proto)

	return NULL;
}
EXPORT_SYMBOL(ip_vs_proto_get);


/*
Loading