* [PATCH] ipvs: Remove possibly unused net variable from ip_vs_out
@ 2015-10-06 8:15 Simon Horman
2015-10-06 18:24 ` Julian Anastasov
0 siblings, 1 reply; 4+ messages in thread
From: Simon Horman @ 2015-10-06 8:15 UTC (permalink / raw)
To: lvs-devel
Cc: netdev, netfilter-devel, Wensong Zhang, Julian Anastasov,
Eric W. Biederman, Simon Horman
Since 6f2bcea9917d ("ipvs: Pass ipvs into ip_vs_in_icmp and
ip_vs_in_icmp_v6") the net variable in ip_vs_out() appears to be unused
unless CONFIG_IP_VS_IPV6 is set. To resolve this remove the net variable
and dereference net asneeded.
Signed-off-by: Simon Horman <horms@verge.net.au>
---
net/netfilter/ipvs/ip_vs_core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index d08df435c2aa..3773154d9b71 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -1172,7 +1172,6 @@ drop:
static unsigned int
ip_vs_out(struct netns_ipvs *ipvs, unsigned int hooknum, struct sk_buff *skb, int af)
{
- struct net *net = ipvs->net;
struct ip_vs_iphdr iph;
struct ip_vs_protocol *pp;
struct ip_vs_proto_data *pd;
@@ -1272,7 +1271,7 @@ ip_vs_out(struct netns_ipvs *ipvs, unsigned int hooknum, struct sk_buff *skb, in
#ifdef CONFIG_IP_VS_IPV6
if (af == AF_INET6) {
if (!skb->dev)
- skb->dev = net->loopback_dev;
+ skb->dev = ipvs->net->loopback_dev;
icmpv6_send(skb,
ICMPV6_DEST_UNREACH,
ICMPV6_PORT_UNREACH,
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ipvs: Remove possibly unused net variable from ip_vs_out
2015-10-06 8:15 [PATCH] ipvs: Remove possibly unused net variable from ip_vs_out Simon Horman
@ 2015-10-06 18:24 ` Julian Anastasov
2015-10-06 23:27 ` Cong Wang
0 siblings, 1 reply; 4+ messages in thread
From: Julian Anastasov @ 2015-10-06 18:24 UTC (permalink / raw)
To: Simon Horman
Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang,
Eric W. Biederman
Hello,
On Tue, 6 Oct 2015, Simon Horman wrote:
> Since 6f2bcea9917d ("ipvs: Pass ipvs into ip_vs_in_icmp and
> ip_vs_in_icmp_v6") the net variable in ip_vs_out() appears to be unused
> unless CONFIG_IP_VS_IPV6 is set. To resolve this remove the net variable
> and dereference net asneeded.
>
> Signed-off-by: Simon Horman <horms@verge.net.au>
Both patches look good to me
Acked-by: Julian Anastasov <ja@ssi.bg>
> ---
> net/netfilter/ipvs/ip_vs_core.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
> index d08df435c2aa..3773154d9b71 100644
> --- a/net/netfilter/ipvs/ip_vs_core.c
> +++ b/net/netfilter/ipvs/ip_vs_core.c
> @@ -1172,7 +1172,6 @@ drop:
> static unsigned int
> ip_vs_out(struct netns_ipvs *ipvs, unsigned int hooknum, struct sk_buff *skb, int af)
> {
> - struct net *net = ipvs->net;
> struct ip_vs_iphdr iph;
> struct ip_vs_protocol *pp;
> struct ip_vs_proto_data *pd;
> @@ -1272,7 +1271,7 @@ ip_vs_out(struct netns_ipvs *ipvs, unsigned int hooknum, struct sk_buff *skb, in
> #ifdef CONFIG_IP_VS_IPV6
> if (af == AF_INET6) {
> if (!skb->dev)
> - skb->dev = net->loopback_dev;
> + skb->dev = ipvs->net->loopback_dev;
> icmpv6_send(skb,
> ICMPV6_DEST_UNREACH,
> ICMPV6_PORT_UNREACH,
> --
> 2.1.4
Regards
--
Julian Anastasov <ja@ssi.bg>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ipvs: Remove possibly unused net variable from ip_vs_out
2015-10-06 18:24 ` Julian Anastasov
@ 2015-10-06 23:27 ` Cong Wang
2015-10-07 1:14 ` Simon Horman
0 siblings, 1 reply; 4+ messages in thread
From: Cong Wang @ 2015-10-06 23:27 UTC (permalink / raw)
To: Julian Anastasov
Cc: Simon Horman, lvs-devel, netdev, netfilter-devel, Wensong Zhang,
Eric W. Biederman
On Tue, Oct 6, 2015 at 11:24 AM, Julian Anastasov <ja@ssi.bg> wrote:
>
> Hello,
>
> On Tue, 6 Oct 2015, Simon Horman wrote:
>
>> Since 6f2bcea9917d ("ipvs: Pass ipvs into ip_vs_in_icmp and
>> ip_vs_in_icmp_v6") the net variable in ip_vs_out() appears to be unused
>> unless CONFIG_IP_VS_IPV6 is set. To resolve this remove the net variable
>> and dereference net asneeded.
>>
>> Signed-off-by: Simon Horman <horms@verge.net.au>
>
> Both patches look good to me
>
> Acked-by: Julian Anastasov <ja@ssi.bg>
>
David sent a same patch earlier:
http://www.spinics.net/lists/netdev/msg345887.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ipvs: Remove possibly unused net variable from ip_vs_out
2015-10-06 23:27 ` Cong Wang
@ 2015-10-07 1:14 ` Simon Horman
0 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2015-10-07 1:14 UTC (permalink / raw)
To: Cong Wang
Cc: Julian Anastasov, lvs-devel, netdev, netfilter-devel,
Wensong Zhang, Eric W. Biederman
On Tue, Oct 06, 2015 at 04:27:35PM -0700, Cong Wang wrote:
> On Tue, Oct 6, 2015 at 11:24 AM, Julian Anastasov <ja@ssi.bg> wrote:
> >
> > Hello,
> >
> > On Tue, 6 Oct 2015, Simon Horman wrote:
> >
> >> Since 6f2bcea9917d ("ipvs: Pass ipvs into ip_vs_in_icmp and
> >> ip_vs_in_icmp_v6") the net variable in ip_vs_out() appears to be unused
> >> unless CONFIG_IP_VS_IPV6 is set. To resolve this remove the net variable
> >> and dereference net asneeded.
> >>
> >> Signed-off-by: Simon Horman <horms@verge.net.au>
> >
> > Both patches look good to me
> >
> > Acked-by: Julian Anastasov <ja@ssi.bg>
> >
>
> David sent a same patch earlier:
>
> http://www.spinics.net/lists/netdev/msg345887.html
Thanks, I have queued up his version in ipvs-next.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-10-07 1:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-06 8:15 [PATCH] ipvs: Remove possibly unused net variable from ip_vs_out Simon Horman
2015-10-06 18:24 ` Julian Anastasov
2015-10-06 23:27 ` Cong Wang
2015-10-07 1:14 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).