net: Copy inner L3 and L4 headers as unaligned on GRE TEB
[linux-2.6-microblaze.git] / net / core / flow_dissector.c
index eab81bc..12e7003 100644 (file)
@@ -399,6 +399,13 @@ ip_proto_again:
                                goto out_bad;
                        proto = eth->h_proto;
                        nhoff += sizeof(*eth);
+
+                       /* Cap headers that we access via pointers at the
+                        * end of the Ethernet header as our maximum alignment
+                        * at that point is only 2 bytes.
+                        */
+                       if (NET_IP_ALIGN)
+                               hlen = nhoff;
                }
 
                key_control->flags |= FLOW_DIS_ENCAPSULATION;