--- zzzz-none-000/linux-5.4.213/include/net/gre.h 2022-09-15 10:04:56.000000000 +0000 +++ miami-7690-761/linux-5.4.213/include/net/gre.h 2024-05-29 11:20:02.000000000 +0000 @@ -31,6 +31,7 @@ int gre_add_protocol(const struct gre_protocol *proto, u8 version); int gre_del_protocol(const struct gre_protocol *proto, u8 version); +bool gre_tunnel_is_fallback_dev(struct net_device *dev); struct net_device *gretap_fb_dev_create(struct net *net, const char *name, u8 name_assign_type); @@ -43,12 +44,24 @@ !strcmp(dev->rtnl_link_ops->kind, "gretap"); } +static inline bool netif_is_gre(const struct net_device *dev) +{ + return dev->rtnl_link_ops && + !strcmp(dev->rtnl_link_ops->kind, "gre"); +} + static inline bool netif_is_ip6gretap(const struct net_device *dev) { return dev->rtnl_link_ops && !strcmp(dev->rtnl_link_ops->kind, "ip6gretap"); } +static inline bool netif_is_ip6gre(const struct net_device *dev) +{ + return dev->rtnl_link_ops && + !strcmp(dev->rtnl_link_ops->kind, "ip6gre"); +} + static inline int gre_calc_hlen(__be16 o_flags) { int addend = 4;