]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_rnh.h
zebra: add struct zmsghdr
[mirror_frr.git] / zebra / zebra_rnh.h
index 7e183684da40917a8bdbcee660c77c0b94060485..7af1dbeaf12540d873ccec10268832ebd7057402 100644 (file)
@@ -39,9 +39,9 @@ struct rnh {
        struct route_entry *state;
        struct prefix resolved_route;
        struct list *client_list;
-       struct list *
-               zebra_static_route_list; /* static routes dependent on this NH
-                                           */
+       struct list
+               *zebra_static_route_list; /* static routes dependent on this NH
+                                            */
        struct list
                *zebra_pseudowire_list; /* pseudowires dependent on this NH */
        struct route_node *node;
@@ -54,6 +54,15 @@ typedef enum { RNH_NEXTHOP_TYPE, RNH_IMPORT_CHECK_TYPE } rnh_type_t;
 extern int zebra_rnh_ip_default_route;
 extern int zebra_rnh_ipv6_default_route;
 
+static inline int rnh_resolve_via_default(int family)
+{
+       if (((family == AF_INET) && zebra_rnh_ip_default_route)
+           || ((family == AF_INET6) && zebra_rnh_ipv6_default_route))
+               return 1;
+       else
+               return 0;
+}
+
 extern struct rnh *zebra_add_rnh(struct prefix *p, vrf_id_t vrfid,
                                 rnh_type_t type);
 extern struct rnh *zebra_lookup_rnh(struct prefix *p, vrf_id_t vrfid,