mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-25 23:41:57 +00:00
netfilter: ipvs: remove unneeded input wrappers
After earlier patch ip_vs_hook_in can be used directly. Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
8a9941b42d
commit
540ff44b28
@ -2093,55 +2093,6 @@ ip_vs_in_hook(void *priv, struct sk_buff *skb, const struct nf_hook_state *state
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* AF_INET handler in NF_INET_LOCAL_IN chain
|
|
||||||
* Schedule and forward packets from remote clients
|
|
||||||
*/
|
|
||||||
static unsigned int
|
|
||||||
ip_vs_remote_request4(void *priv, struct sk_buff *skb,
|
|
||||||
const struct nf_hook_state *state)
|
|
||||||
{
|
|
||||||
return ip_vs_in_hook(priv, skb, state);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* AF_INET handler in NF_INET_LOCAL_OUT chain
|
|
||||||
* Schedule and forward packets from local clients
|
|
||||||
*/
|
|
||||||
static unsigned int
|
|
||||||
ip_vs_local_request4(void *priv, struct sk_buff *skb,
|
|
||||||
const struct nf_hook_state *state)
|
|
||||||
{
|
|
||||||
return ip_vs_in_hook(priv, skb, state);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_IP_VS_IPV6
|
|
||||||
|
|
||||||
/*
|
|
||||||
* AF_INET6 handler in NF_INET_LOCAL_IN chain
|
|
||||||
* Schedule and forward packets from remote clients
|
|
||||||
*/
|
|
||||||
static unsigned int
|
|
||||||
ip_vs_remote_request6(void *priv, struct sk_buff *skb,
|
|
||||||
const struct nf_hook_state *state)
|
|
||||||
{
|
|
||||||
return ip_vs_in_hook(priv, skb, state);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* AF_INET6 handler in NF_INET_LOCAL_OUT chain
|
|
||||||
* Schedule and forward packets from local clients
|
|
||||||
*/
|
|
||||||
static unsigned int
|
|
||||||
ip_vs_local_request6(void *priv, struct sk_buff *skb,
|
|
||||||
const struct nf_hook_state *state)
|
|
||||||
{
|
|
||||||
return ip_vs_in_hook(priv, skb, state);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* It is hooked at the NF_INET_FORWARD chain, in order to catch ICMP
|
* It is hooked at the NF_INET_FORWARD chain, in order to catch ICMP
|
||||||
* related packets destined for 0.0.0.0/0.
|
* related packets destined for 0.0.0.0/0.
|
||||||
@ -2202,7 +2153,7 @@ static const struct nf_hook_ops ip_vs_ops4[] = {
|
|||||||
* or VS/NAT(change destination), so that filtering rules can be
|
* or VS/NAT(change destination), so that filtering rules can be
|
||||||
* applied to IPVS. */
|
* applied to IPVS. */
|
||||||
{
|
{
|
||||||
.hook = ip_vs_remote_request4,
|
.hook = ip_vs_in_hook,
|
||||||
.pf = NFPROTO_IPV4,
|
.pf = NFPROTO_IPV4,
|
||||||
.hooknum = NF_INET_LOCAL_IN,
|
.hooknum = NF_INET_LOCAL_IN,
|
||||||
.priority = NF_IP_PRI_NAT_SRC - 1,
|
.priority = NF_IP_PRI_NAT_SRC - 1,
|
||||||
@ -2216,7 +2167,7 @@ static const struct nf_hook_ops ip_vs_ops4[] = {
|
|||||||
},
|
},
|
||||||
/* After mangle, schedule and forward local requests */
|
/* After mangle, schedule and forward local requests */
|
||||||
{
|
{
|
||||||
.hook = ip_vs_local_request4,
|
.hook = ip_vs_in_hook,
|
||||||
.pf = NFPROTO_IPV4,
|
.pf = NFPROTO_IPV4,
|
||||||
.hooknum = NF_INET_LOCAL_OUT,
|
.hooknum = NF_INET_LOCAL_OUT,
|
||||||
.priority = NF_IP_PRI_NAT_DST + 2,
|
.priority = NF_IP_PRI_NAT_DST + 2,
|
||||||
@ -2251,7 +2202,7 @@ static const struct nf_hook_ops ip_vs_ops6[] = {
|
|||||||
* or VS/NAT(change destination), so that filtering rules can be
|
* or VS/NAT(change destination), so that filtering rules can be
|
||||||
* applied to IPVS. */
|
* applied to IPVS. */
|
||||||
{
|
{
|
||||||
.hook = ip_vs_remote_request6,
|
.hook = ip_vs_in_hook,
|
||||||
.pf = NFPROTO_IPV6,
|
.pf = NFPROTO_IPV6,
|
||||||
.hooknum = NF_INET_LOCAL_IN,
|
.hooknum = NF_INET_LOCAL_IN,
|
||||||
.priority = NF_IP6_PRI_NAT_SRC - 1,
|
.priority = NF_IP6_PRI_NAT_SRC - 1,
|
||||||
@ -2265,7 +2216,7 @@ static const struct nf_hook_ops ip_vs_ops6[] = {
|
|||||||
},
|
},
|
||||||
/* After mangle, schedule and forward local requests */
|
/* After mangle, schedule and forward local requests */
|
||||||
{
|
{
|
||||||
.hook = ip_vs_local_request6,
|
.hook = ip_vs_in_hook,
|
||||||
.pf = NFPROTO_IPV6,
|
.pf = NFPROTO_IPV6,
|
||||||
.hooknum = NF_INET_LOCAL_OUT,
|
.hooknum = NF_INET_LOCAL_OUT,
|
||||||
.priority = NF_IP6_PRI_NAT_DST + 2,
|
.priority = NF_IP6_PRI_NAT_DST + 2,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user