]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/net/vxlan.c
fec: Do not access unexisting register in Coldfire
[mirror_ubuntu-artful-kernel.git] / drivers / net / vxlan.c
index 800106a7246cb165d46b4e25316cbfbc41996cef..1c0fa364323e280f2ed25c86bdcb8f3508a26c34 100644 (file)
@@ -1143,7 +1143,7 @@ static int vxlan_igmp_leave(struct vxlan_dev *vxlan)
 static bool vxlan_remcsum(struct vxlanhdr *unparsed,
                          struct sk_buff *skb, u32 vxflags)
 {
-       size_t start, offset, plen;
+       size_t start, offset;
 
        if (!(unparsed->vx_flags & VXLAN_HF_RCO) || skb->remcsum_offload)
                goto out;
@@ -1151,9 +1151,7 @@ static bool vxlan_remcsum(struct vxlanhdr *unparsed,
        start = vxlan_rco_start(unparsed->vx_vni);
        offset = start + vxlan_rco_offset(unparsed->vx_vni);
 
-       plen = sizeof(struct vxlanhdr) + offset + sizeof(u16);
-
-       if (!pskb_may_pull(skb, plen))
+       if (!pskb_may_pull(skb, offset + sizeof(u16)))
                return false;
 
        skb_remcsum_process(skb, (void *)(vxlan_hdr(skb) + 1), start, offset,
@@ -1810,10 +1808,9 @@ static struct dst_entry *vxlan6_get_route(struct vxlan_dev *vxlan,
 
        memset(&fl6, 0, sizeof(fl6));
        fl6.flowi6_oif = oif;
-       fl6.flowi6_tos = RT_TOS(tos);
        fl6.daddr = *daddr;
        fl6.saddr = vxlan->cfg.saddr.sin6.sin6_addr;
-       fl6.flowlabel = label;
+       fl6.flowlabel = ip6_make_flowinfo(RT_TOS(tos), label);
        fl6.flowi6_mark = skb->mark;
        fl6.flowi6_proto = IPPROTO_UDP;