mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 19:51:58 +00:00
zebra: Re-add onlink flag due to loss in earlier commit
commit: 0eb97b860d
Removed this chunk of code in zebra:
- if (ifp)
- if (connected_is_unnumbered(ifp))
- SET_FLAG(nexthop->flags, NEXTHOP_FLAG_ONLINK);
Effectively if we had a NEXTHOP_TYPE_IPV4_IFINDEX we would
auto set the onlink flag. This commit dropped it for some reason.
Add it back in an intelligent manner.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
abe5af1774
commit
54bea4e537
@ -65,6 +65,7 @@
|
|||||||
#include "zebra/zapi_msg.h"
|
#include "zebra/zapi_msg.h"
|
||||||
#include "zebra/zebra_errors.h"
|
#include "zebra/zebra_errors.h"
|
||||||
#include "zebra/zebra_mlag.h"
|
#include "zebra/zebra_mlag.h"
|
||||||
|
#include "zebra/connected.h"
|
||||||
|
|
||||||
/* Encoding helpers -------------------------------------------------------- */
|
/* Encoding helpers -------------------------------------------------------- */
|
||||||
|
|
||||||
@ -1419,6 +1420,7 @@ static void zread_route_add(ZAPI_HANDLER_ARGS)
|
|||||||
int i, ret;
|
int i, ret;
|
||||||
vrf_id_t vrf_id;
|
vrf_id_t vrf_id;
|
||||||
struct ipaddr vtep_ip;
|
struct ipaddr vtep_ip;
|
||||||
|
struct interface *ifp;
|
||||||
|
|
||||||
s = msg;
|
s = msg;
|
||||||
if (zapi_route_decode(s, &api) < 0) {
|
if (zapi_route_decode(s, &api) < 0) {
|
||||||
@ -1511,6 +1513,9 @@ static void zread_route_add(ZAPI_HANDLER_ARGS)
|
|||||||
&api_nh->gate.ipv4, NULL, ifindex,
|
&api_nh->gate.ipv4, NULL, ifindex,
|
||||||
api_nh->vrf_id);
|
api_nh->vrf_id);
|
||||||
|
|
||||||
|
ifp = if_lookup_by_index(ifindex, api_nh->vrf_id);
|
||||||
|
if (ifp && connected_is_unnumbered(ifp))
|
||||||
|
SET_FLAG(nexthop->flags, NEXTHOP_FLAG_ONLINK);
|
||||||
/* Special handling for IPv4 routes sourced from EVPN:
|
/* Special handling for IPv4 routes sourced from EVPN:
|
||||||
* the nexthop and associated MAC need to be installed.
|
* the nexthop and associated MAC need to be installed.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user