vxlan: Remove access to nexthop group struct
[platform/kernel/linux-starfive.git] / include / net / nexthop.h
index 3f9e0ca..3a4f9e3 100644 (file)
@@ -151,6 +151,17 @@ static inline bool nexthop_is_fdb(const struct nexthop *nh)
        }
 }
 
+static inline bool nexthop_has_v4(const struct nexthop *nh)
+{
+       if (nh->is_group) {
+               struct nh_group *nh_grp;
+
+               nh_grp = rcu_dereference_rtnl(nh->nh_grp);
+               return nh_grp->has_v4;
+       }
+       return false;
+}
+
 static inline bool nexthop_is_multipath(const struct nexthop *nh)
 {
        if (nh->is_group) {