Commit 4c809d63 authored by Alban Crequy's avatar Alban Crequy Committed by Pablo Neira Ayuso

netfilter: ipvs: switch hook PFs to nfproto

This patch is a cleanup. Use NFPROTO_* for consistency with other
netfilter code.
Signed-off-by: default avatarAlban Crequy <alban.crequy@collabora.co.uk>
Reviewed-by: default avatarJavier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: default avatarVincent Sanders <vincent.sanders@collabora.co.uk>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 89a48e35
...@@ -1742,7 +1742,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = { ...@@ -1742,7 +1742,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = {
{ {
.hook = ip_vs_reply4, .hook = ip_vs_reply4,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pf = PF_INET, .pf = NFPROTO_IPV4,
.hooknum = NF_INET_LOCAL_IN, .hooknum = NF_INET_LOCAL_IN,
.priority = NF_IP_PRI_NAT_SRC - 2, .priority = NF_IP_PRI_NAT_SRC - 2,
}, },
...@@ -1752,7 +1752,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = { ...@@ -1752,7 +1752,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = {
{ {
.hook = ip_vs_remote_request4, .hook = ip_vs_remote_request4,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pf = PF_INET, .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,
}, },
...@@ -1760,7 +1760,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = { ...@@ -1760,7 +1760,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = {
{ {
.hook = ip_vs_local_reply4, .hook = ip_vs_local_reply4,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pf = PF_INET, .pf = NFPROTO_IPV4,
.hooknum = NF_INET_LOCAL_OUT, .hooknum = NF_INET_LOCAL_OUT,
.priority = NF_IP_PRI_NAT_DST + 1, .priority = NF_IP_PRI_NAT_DST + 1,
}, },
...@@ -1768,7 +1768,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = { ...@@ -1768,7 +1768,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = {
{ {
.hook = ip_vs_local_request4, .hook = ip_vs_local_request4,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pf = PF_INET, .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,
}, },
...@@ -1777,7 +1777,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = { ...@@ -1777,7 +1777,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = {
{ {
.hook = ip_vs_forward_icmp, .hook = ip_vs_forward_icmp,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pf = PF_INET, .pf = NFPROTO_IPV4,
.hooknum = NF_INET_FORWARD, .hooknum = NF_INET_FORWARD,
.priority = 99, .priority = 99,
}, },
...@@ -1785,7 +1785,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = { ...@@ -1785,7 +1785,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = {
{ {
.hook = ip_vs_reply4, .hook = ip_vs_reply4,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pf = PF_INET, .pf = NFPROTO_IPV4,
.hooknum = NF_INET_FORWARD, .hooknum = NF_INET_FORWARD,
.priority = 100, .priority = 100,
}, },
...@@ -1794,7 +1794,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = { ...@@ -1794,7 +1794,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = {
{ {
.hook = ip_vs_reply6, .hook = ip_vs_reply6,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pf = PF_INET6, .pf = NFPROTO_IPV6,
.hooknum = NF_INET_LOCAL_IN, .hooknum = NF_INET_LOCAL_IN,
.priority = NF_IP6_PRI_NAT_SRC - 2, .priority = NF_IP6_PRI_NAT_SRC - 2,
}, },
...@@ -1804,7 +1804,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = { ...@@ -1804,7 +1804,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = {
{ {
.hook = ip_vs_remote_request6, .hook = ip_vs_remote_request6,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pf = PF_INET6, .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,
}, },
...@@ -1812,7 +1812,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = { ...@@ -1812,7 +1812,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = {
{ {
.hook = ip_vs_local_reply6, .hook = ip_vs_local_reply6,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pf = PF_INET, .pf = NFPROTO_IPV4,
.hooknum = NF_INET_LOCAL_OUT, .hooknum = NF_INET_LOCAL_OUT,
.priority = NF_IP6_PRI_NAT_DST + 1, .priority = NF_IP6_PRI_NAT_DST + 1,
}, },
...@@ -1820,7 +1820,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = { ...@@ -1820,7 +1820,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = {
{ {
.hook = ip_vs_local_request6, .hook = ip_vs_local_request6,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pf = PF_INET6, .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,
}, },
...@@ -1829,7 +1829,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = { ...@@ -1829,7 +1829,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = {
{ {
.hook = ip_vs_forward_icmp_v6, .hook = ip_vs_forward_icmp_v6,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pf = PF_INET6, .pf = NFPROTO_IPV6,
.hooknum = NF_INET_FORWARD, .hooknum = NF_INET_FORWARD,
.priority = 99, .priority = 99,
}, },
...@@ -1837,7 +1837,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = { ...@@ -1837,7 +1837,7 @@ static struct nf_hook_ops ip_vs_ops[] __read_mostly = {
{ {
.hook = ip_vs_reply6, .hook = ip_vs_reply6,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pf = PF_INET6, .pf = NFPROTO_IPV6,
.hooknum = NF_INET_FORWARD, .hooknum = NF_INET_FORWARD,
.priority = 100, .priority = 100,
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment