aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2015-09-18 15:33:05 -0400
committerPablo Neira Ayuso <pablo@netfilter.org>2015-09-18 16:00:10 -0400
commit176971b33859135d8dbda9b79e16cb1cf615eb92 (patch)
tree5d4a7c1c7e0bf2db6919dbd2bb6d7127c9fc4e9b
parenta31f1adc0948930fba9ab5a111ccd735a5d864c6 (diff)
ipvs: Read hooknum from state rather than ops->hooknum
This should be more cache efficient as state is more likely to be in core, and the netfilter core will stop passing in ops soon. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--net/netfilter/ipvs/ip_vs_core.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index 453972c6909e..40e3c85f83b5 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -1314,7 +1314,7 @@ static unsigned int
1314ip_vs_reply4(const struct nf_hook_ops *ops, struct sk_buff *skb, 1314ip_vs_reply4(const struct nf_hook_ops *ops, struct sk_buff *skb,
1315 const struct nf_hook_state *state) 1315 const struct nf_hook_state *state)
1316{ 1316{
1317 return ip_vs_out(ops->hooknum, skb, AF_INET); 1317 return ip_vs_out(state->hook, skb, AF_INET);
1318} 1318}
1319 1319
1320/* 1320/*
@@ -1325,7 +1325,7 @@ static unsigned int
1325ip_vs_local_reply4(const struct nf_hook_ops *ops, struct sk_buff *skb, 1325ip_vs_local_reply4(const struct nf_hook_ops *ops, struct sk_buff *skb,
1326 const struct nf_hook_state *state) 1326 const struct nf_hook_state *state)
1327{ 1327{
1328 return ip_vs_out(ops->hooknum, skb, AF_INET); 1328 return ip_vs_out(state->hook, skb, AF_INET);
1329} 1329}
1330 1330
1331#ifdef CONFIG_IP_VS_IPV6 1331#ifdef CONFIG_IP_VS_IPV6
@@ -1339,7 +1339,7 @@ static unsigned int
1339ip_vs_reply6(const struct nf_hook_ops *ops, struct sk_buff *skb, 1339ip_vs_reply6(const struct nf_hook_ops *ops, struct sk_buff *skb,
1340 const struct nf_hook_state *state) 1340 const struct nf_hook_state *state)
1341{ 1341{
1342 return ip_vs_out(ops->hooknum, skb, AF_INET6); 1342 return ip_vs_out(state->hook, skb, AF_INET6);
1343} 1343}
1344 1344
1345/* 1345/*
@@ -1350,7 +1350,7 @@ static unsigned int
1350ip_vs_local_reply6(const struct nf_hook_ops *ops, struct sk_buff *skb, 1350ip_vs_local_reply6(const struct nf_hook_ops *ops, struct sk_buff *skb,
1351 const struct nf_hook_state *state) 1351 const struct nf_hook_state *state)
1352{ 1352{
1353 return ip_vs_out(ops->hooknum, skb, AF_INET6); 1353 return ip_vs_out(state->hook, skb, AF_INET6);
1354} 1354}
1355 1355
1356#endif 1356#endif
@@ -1850,7 +1850,7 @@ static unsigned int
1850ip_vs_remote_request4(const struct nf_hook_ops *ops, struct sk_buff *skb, 1850ip_vs_remote_request4(const struct nf_hook_ops *ops, struct sk_buff *skb,
1851 const struct nf_hook_state *state) 1851 const struct nf_hook_state *state)
1852{ 1852{
1853 return ip_vs_in(ops->hooknum, skb, AF_INET); 1853 return ip_vs_in(state->hook, skb, AF_INET);
1854} 1854}
1855 1855
1856/* 1856/*
@@ -1861,7 +1861,7 @@ static unsigned int
1861ip_vs_local_request4(const struct nf_hook_ops *ops, struct sk_buff *skb, 1861ip_vs_local_request4(const struct nf_hook_ops *ops, struct sk_buff *skb,
1862 const struct nf_hook_state *state) 1862 const struct nf_hook_state *state)
1863{ 1863{
1864 return ip_vs_in(ops->hooknum, skb, AF_INET); 1864 return ip_vs_in(state->hook, skb, AF_INET);
1865} 1865}
1866 1866
1867#ifdef CONFIG_IP_VS_IPV6 1867#ifdef CONFIG_IP_VS_IPV6
@@ -1874,7 +1874,7 @@ static unsigned int
1874ip_vs_remote_request6(const struct nf_hook_ops *ops, struct sk_buff *skb, 1874ip_vs_remote_request6(const struct nf_hook_ops *ops, struct sk_buff *skb,
1875 const struct nf_hook_state *state) 1875 const struct nf_hook_state *state)
1876{ 1876{
1877 return ip_vs_in(ops->hooknum, skb, AF_INET6); 1877 return ip_vs_in(state->hook, skb, AF_INET6);
1878} 1878}
1879 1879
1880/* 1880/*
@@ -1885,7 +1885,7 @@ static unsigned int
1885ip_vs_local_request6(const struct nf_hook_ops *ops, struct sk_buff *skb, 1885ip_vs_local_request6(const struct nf_hook_ops *ops, struct sk_buff *skb,
1886 const struct nf_hook_state *state) 1886 const struct nf_hook_state *state)
1887{ 1887{
1888 return ip_vs_in(ops->hooknum, skb, AF_INET6); 1888 return ip_vs_in(state->hook, skb, AF_INET6);
1889} 1889}
1890 1890
1891#endif 1891#endif