* ipvs: memset problem/bug in ip_vs_tunnel_xmit_v6() ?
@ 2012-09-04 9:52 Jesper Dangaard Brouer
2012-09-04 19:53 ` Julian Anastasov
0 siblings, 1 reply; 2+ messages in thread
From: Jesper Dangaard Brouer @ 2012-09-04 9:52 UTC (permalink / raw)
To: LVS devel, Julian Anastasov
Hi
While looking at the IP6CB related code in IPVS, I stumbled upon this,
memset in ip_vs_tunnel_xmit_v6() which look wrong in a IPv6 related
function...
diff --git a/net/netfilter/ipvs/ip_vs_xmit.c
b/net/netfilter/ipvs/ip_vs_xmit.c
index 1060bd5..7efa90c 100644
--- a/net/netfilter/ipvs/ip_vs_xmit.c
+++ b/net/netfilter/ipvs/ip_vs_xmit.c
@@ -998,6 +998,7 @@ ip_vs_tunnel_xmit_v6(struct sk_buff *skb, struct
ip_vs_conn *cp,
skb_push(skb, sizeof(struct ipv6hdr));
skb_reset_network_header(skb);
+ /* jbrouer: Hmmm, memset below looks wrong in a IPv6 context */
memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
/* drop old route */
The change looks like a copy-paste introduced in commit:
commit b3cdd2a73867d309dca288b8e820c09e3b7f1da1
Author: Julius Volz <juliusv@google.com>
Date: Tue Sep 2 15:55:45 2008 +0200
IPVS: Add and bind IPv6 xmit functions
Add xmit functions for IPv6. Also add the already needed __ip_vs_get_out_rt_v6()
to ip_vs_core.c. Bind the new xmit functions to v6 connections.
Signed-off-by: Julius Volz <juliusv@google.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Sr. Network Kernel Developer at Red Hat
Author of http://www.iptv-analyzer.org
LinkedIn: http://www.linkedin.com/in/brouer
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: ipvs: memset problem/bug in ip_vs_tunnel_xmit_v6() ?
2012-09-04 9:52 ipvs: memset problem/bug in ip_vs_tunnel_xmit_v6() ? Jesper Dangaard Brouer
@ 2012-09-04 19:53 ` Julian Anastasov
0 siblings, 0 replies; 2+ messages in thread
From: Julian Anastasov @ 2012-09-04 19:53 UTC (permalink / raw)
To: Jesper Dangaard Brouer; +Cc: LVS devel
Hello,
On Tue, 4 Sep 2012, Jesper Dangaard Brouer wrote:
> Hi
>
> While looking at the IP6CB related code in IPVS, I stumbled upon this,
> memset in ip_vs_tunnel_xmit_v6() which look wrong in a IPv6 related
> function...
I saw it too in the last days. But I was not
sure what needs to be reset for output IPv6 path, may be
only IP6CB(skb)->flags matters and we should preserve it.
Comparing it with other places, eg. ip6_tnl_xmit2, may be
we should just delete this memset? By this way we will
preserve the flags.
> diff --git a/net/netfilter/ipvs/ip_vs_xmit.c
> b/net/netfilter/ipvs/ip_vs_xmit.c
> index 1060bd5..7efa90c 100644
> --- a/net/netfilter/ipvs/ip_vs_xmit.c
> +++ b/net/netfilter/ipvs/ip_vs_xmit.c
> @@ -998,6 +998,7 @@ ip_vs_tunnel_xmit_v6(struct sk_buff *skb, struct
> ip_vs_conn *cp,
>
> skb_push(skb, sizeof(struct ipv6hdr));
> skb_reset_network_header(skb);
> + /* jbrouer: Hmmm, memset below looks wrong in a IPv6 context */
> memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
>
> /* drop old route */
>
>
> The change looks like a copy-paste introduced in commit:
>
> commit b3cdd2a73867d309dca288b8e820c09e3b7f1da1
> Author: Julius Volz <juliusv@google.com>
> Date: Tue Sep 2 15:55:45 2008 +0200
>
> IPVS: Add and bind IPv6 xmit functions
>
> Add xmit functions for IPv6. Also add the already needed __ip_vs_get_out_rt_v6()
> to ip_vs_core.c. Bind the new xmit functions to v6 connections.
>
> Signed-off-by: Julius Volz <juliusv@google.com>
> Signed-off-by: Simon Horman <horms@verge.net.au>
>
>
> --
> Best regards,
> Jesper Dangaard Brouer
> MSc.CS, Sr. Network Kernel Developer at Red Hat
> Author of http://www.iptv-analyzer.org
> LinkedIn: http://www.linkedin.com/in/brouer
Regards
--
Julian Anastasov <ja@ssi.bg>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-04 19:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-04 9:52 ipvs: memset problem/bug in ip_vs_tunnel_xmit_v6() ? Jesper Dangaard Brouer
2012-09-04 19:53 ` Julian Anastasov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.