|
@@ -5,6 +5,7 @@
|
|
|
#include <linux/if_vlan.h>
|
|
|
#include <net/udp_tunnel.h>
|
|
|
#include <net/dst_metadata.h>
|
|
|
+#include <net/rtnetlink.h>
|
|
|
|
|
|
/* VXLAN protocol (RFC 7348) header:
|
|
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
@@ -402,4 +403,10 @@ static inline bool vxlan_addr_multicast(const union vxlan_addr *ipa)
|
|
|
|
|
|
#endif /* IS_ENABLED(CONFIG_IPV6) */
|
|
|
|
|
|
+static inline bool netif_is_vxlan(const struct net_device *dev)
|
|
|
+{
|
|
|
+ return dev->rtnl_link_ops &&
|
|
|
+ !strcmp(dev->rtnl_link_ops->kind, "vxlan");
|
|
|
+}
|
|
|
+
|
|
|
#endif
|