On 01/06/2014 01:55 PM, Jesse Gross wrote:
> On Mon, Jan 6, 2014 at 11:37 AM, Chris J Arges
> <[email protected]> wrote:
>> Hi,
>> I've been trying to determine a fix for the 1.4.6 series of openvswitch
>> due to a bug when using a 3.5 series linux kernel with the ovs 1.4.6
>> dkms module.
>>
>> The details on how to reproduce and backtrace are here:
>> https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/1262692
>>
>> Commit 703133de331a7a7df47f31fb9de51dc6f68a9de8 (ip: generate unique IP
>> identificator if local fragmentation is allowed) in the linux kernel if
>> reverted fixes the issue. Looking through the openvswitch code, the only
>> difference I suspect is if skb->local_df is changed.
> 
> That patch changed the function signature of ip_select_ident() so when
> it is called from OVS pointers get dereferenced as different types
> than they actually are.
> 

The following patch fixes the issue for me; however I'm unsure of how to
ifdef the fix. The change appears in upstream around the 3.12-rc, but
this change has been applied to many linux stable versions already
(v3.2.52 for example).

Any suggestions for a proper patch for ovs series that have the
ip_select_ident call?

Thanks,
--chris j arges

--

diff --git a/datapath/tunnel.c b/datapath/tunnel.c
index 1ebbc77..d62e1ea 100644
--- a/datapath/tunnel.c
+++ b/datapath/tunnel.c
@@ -1294,8 +1294,14 @@ int ovs_tnl_send(struct vport *vport, struct
sk_buff *skb)
                iph->tos = tos;
                iph->ttl = ttl;
                iph->frag_off = frag_off;
-               ip_select_ident(iph, &rt_dst(rt), NULL);

+               /* linux commit 703133de changes the interface of
+                  ip_select_ident from iph to skb */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)
+               ip_select_ident(skb, &rt_dst(rt), NULL);
+#else
+               ip_select_ident(iph, &rt_dst(rt), NULL);
+#endif
                skb = tnl_vport->tnl_ops->update_header(vport, mutable,
                                                        &rt_dst(rt), skb);
                if (unlikely(!skb))
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to