hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/include/net/gre.h
....@@ -37,8 +37,17 @@
3737 int gre_parse_header(struct sk_buff *skb, struct tnl_ptk_info *tpi,
3838 bool *csum_err, __be16 proto, int nhs);
3939
40
-bool is_gretap_dev(const struct net_device *dev);
41
-bool is_ip6gretap_dev(const struct net_device *dev);
40
+static inline bool netif_is_gretap(const struct net_device *dev)
41
+{
42
+ return dev->rtnl_link_ops &&
43
+ !strcmp(dev->rtnl_link_ops->kind, "gretap");
44
+}
45
+
46
+static inline bool netif_is_ip6gretap(const struct net_device *dev)
47
+{
48
+ return dev->rtnl_link_ops &&
49
+ !strcmp(dev->rtnl_link_ops->kind, "ip6gretap");
50
+}
4251
4352 static inline int gre_calc_hlen(__be16 o_flags)
4453 {