summaryrefslogtreecommitdiff
path: root/include/linux/if_ether.h
diff options
context:
space:
mode:
authorAlexander Duyck <aduyck@mirantis.com>2016-05-02 09:25:16 -0700
committerDavid S. Miller <davem@davemloft.net>2016-05-03 16:00:54 -0400
commitaf67eb9e7e1ab37880459f83153d34b3c42b0075 (patch)
tree07ad6618b99e127871db7b4c77c586730cd18fcb /include/linux/if_ether.h
parent996e802187889f1cd412e6929c9344b92ccb78c4 (diff)
vxlan: Add checksum check to the features check function
We need to perform an additional check on the inner headers to determine if we can offload the checksum for them. Previously this check didn't occur so we would generate an invalid frame in the case of an IPv6 header encapsulated inside of an IPv4 tunnel. To fix this I added a secondary check to vxlan_features_check so that we can verify that we can offload the inner checksum. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/if_ether.h')
-rw-r--r--include/linux/if_ether.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h
index d5569734f672..548fd535fd02 100644
--- a/include/linux/if_ether.h
+++ b/include/linux/if_ether.h
@@ -28,6 +28,11 @@ static inline struct ethhdr *eth_hdr(const struct sk_buff *skb)
return (struct ethhdr *)skb_mac_header(skb);
}
+static inline struct ethhdr *inner_eth_hdr(const struct sk_buff *skb)
+{
+ return (struct ethhdr *)skb_inner_mac_header(skb);
+}
+
int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr);
extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len);