diff options
author | David S. Miller <davem@davemloft.net> | 2012-11-17 22:00:43 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-17 22:00:43 -0500 |
commit | 67f4efdce7d85282fbd5832cddc80a07eb89b6d6 (patch) | |
tree | 9a1771ef13b27abdf8cf172e5b7556ab93e5c48c /drivers/net/vxlan.c | |
parent | c53aa5058ad5ca8876a47d6639ad4d4f2c5ed584 (diff) | |
parent | f4a75d2eb7b1e2206094b901be09adb31ba63681 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Minor line offset auto-merges.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r-- | drivers/net/vxlan.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 9814d67237f1..6898a7932cff 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * VXLAN: Virtual eXtensiable Local Area Network | 2 | * VXLAN: Virtual eXtensible Local Area Network |
3 | * | 3 | * |
4 | * Copyright (c) 2012 Vyatta Inc. | 4 | * Copyright (c) 2012 Vyatta Inc. |
5 | * | 5 | * |
@@ -50,8 +50,8 @@ | |||
50 | 50 | ||
51 | #define VXLAN_N_VID (1u << 24) | 51 | #define VXLAN_N_VID (1u << 24) |
52 | #define VXLAN_VID_MASK (VXLAN_N_VID - 1) | 52 | #define VXLAN_VID_MASK (VXLAN_N_VID - 1) |
53 | /* VLAN + IP header + UDP + VXLAN */ | 53 | /* IP header + UDP + VXLAN + Ethernet header */ |
54 | #define VXLAN_HEADROOM (4 + 20 + 8 + 8) | 54 | #define VXLAN_HEADROOM (20 + 8 + 8 + 14) |
55 | 55 | ||
56 | #define VXLAN_FLAGS 0x08000000 /* struct vxlanhdr.vx_flags required value. */ | 56 | #define VXLAN_FLAGS 0x08000000 /* struct vxlanhdr.vx_flags required value. */ |
57 | 57 | ||
@@ -1102,6 +1102,10 @@ static int vxlan_newlink(struct net *net, struct net_device *dev, | |||
1102 | 1102 | ||
1103 | if (!tb[IFLA_MTU]) | 1103 | if (!tb[IFLA_MTU]) |
1104 | dev->mtu = lowerdev->mtu - VXLAN_HEADROOM; | 1104 | dev->mtu = lowerdev->mtu - VXLAN_HEADROOM; |
1105 | |||
1106 | /* update header length based on lower device */ | ||
1107 | dev->hard_header_len = lowerdev->hard_header_len + | ||
1108 | VXLAN_HEADROOM; | ||
1105 | } | 1109 | } |
1106 | 1110 | ||
1107 | if (data[IFLA_VXLAN_TOS]) | 1111 | if (data[IFLA_VXLAN_TOS]) |