]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_fpm_netlink.c
Merge pull request #5706 from mjstapp/fix_nh_debug_show
[mirror_frr.git] / zebra / zebra_fpm_netlink.c
index d5479bc627ae1ba777d636bf0ef166825995bec0..7786dc246c34eac08cef50020ec9b87f2a497d19 100644 (file)
@@ -195,7 +195,7 @@ typedef struct netlink_route_info_t_ {
  * Add information about the given nexthop to the given route info
  * structure.
  *
- * Returns TRUE if a nexthop was added, FALSE otherwise.
+ * Returns true if a nexthop was added, false otherwise.
  */
 static int netlink_route_info_add_nh(netlink_route_info_t *ri,
                                     struct nexthop *nexthop,
@@ -238,7 +238,7 @@ static int netlink_route_info_add_nh(netlink_route_info_t *ri,
        if (re && CHECK_FLAG(re->flags, ZEBRA_FLAG_EVPN_ROUTE)) {
                nhi.encap_info.encap_type = FPM_NH_ENCAP_VXLAN;
 
-               zl3vni = zl3vni_from_vrf(ri->rtm_table);
+               zl3vni = zl3vni_from_vrf(nexthop->vrf_id);
                if (zl3vni && is_l3vni_oper_up(zl3vni)) {
 
                        /* Add VNI to VxLAN encap info */
@@ -278,7 +278,7 @@ static uint8_t netlink_proto_from_route_type(int type)
  *
  * Fill out the route information object from the given route.
  *
- * Returns TRUE on success and FALSE on failure.
+ * Returns true on success and false on failure.
  */
 static int netlink_route_info_fill(netlink_route_info_t *ri, int cmd,
                                   rib_dest_t *dest, struct route_entry *re)
@@ -314,7 +314,7 @@ static int netlink_route_info_fill(netlink_route_info_t *ri, int cmd,
        ri->rtm_type = RTN_UNICAST;
        ri->metric = &re->metric;
 
-       for (ALL_NEXTHOPS(re->ng, nexthop)) {
+       for (ALL_NEXTHOPS_PTR(re->nhe->nhg, nexthop)) {
                if (ri->num_nhs >= zrouter.multipath_num)
                        break;