]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #10908 from donaldsharp/proto_only_error
authormobash-rasool <mobash.rasool@gmail.com>
Tue, 19 Apr 2022 15:57:29 +0000 (21:27 +0530)
committerGitHub <noreply@github.com>
Tue, 19 Apr 2022 15:57:29 +0000 (21:27 +0530)
zebra: When `zebra nexthop proto only` limit errors

1  2 
zebra/zebra_nhg.c

diff --combined zebra/zebra_nhg.c
index d1a34d096205b3cef3611be938ac63c3a1164af5,f4524a80180b8cd160ad54f07d363c49eb0dbc26..069d35c6a365828db7c2cd67ec24041d09fac697
@@@ -2265,8 -2265,7 +2265,8 @@@ static int nexthop_active(struct nextho
                        continue;
                }
  
 -              if (match->type == ZEBRA_ROUTE_CONNECT) {
 +              if ((match->type == ZEBRA_ROUTE_CONNECT) ||
 +                  (RIB_SYSTEM_ROUTE(match) && RSYSTEM_ROUTE(type))) {
                        match = zebra_nhg_connected_ifindex(rn, match,
                                                            nexthop->ifindex);
  
@@@ -3002,10 -3001,12 +3002,12 @@@ void zebra_nhg_dplane_result(struct zeb
                                                 nhe->zapi_session, nhe->id,
                                                 ZAPI_NHG_FAIL_INSTALL);
  
-                       flog_err(
-                               EC_ZEBRA_DP_INSTALL_FAIL,
-                               "Failed to install Nexthop ID (%u) into the kernel",
-                               nhe->id);
+                       if (!(zebra_nhg_proto_nexthops_only() &&
+                             !PROTO_OWNED(nhe)))
+                               flog_err(
+                                       EC_ZEBRA_DP_INSTALL_FAIL,
+                                       "Failed to install Nexthop ID (%u) into the kernel",
+                                       nhe->id);
                }
                break;