mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 11:44:16 +00:00
Merge pull request #282 from opensourcerouting/ldpd-lspcheck
ldpd: remove pseudowire LSP check
This commit is contained in:
commit
138f894409
31
ldpd/l2vpn.c
31
ldpd/l2vpn.c
@ -282,9 +282,6 @@ l2vpn_pw_reset(struct l2vpn_pw *pw)
|
|||||||
int
|
int
|
||||||
l2vpn_pw_ok(struct l2vpn_pw *pw, struct fec_nh *fnh)
|
l2vpn_pw_ok(struct l2vpn_pw *pw, struct fec_nh *fnh)
|
||||||
{
|
{
|
||||||
struct fec fec;
|
|
||||||
struct fec_node *fn;
|
|
||||||
|
|
||||||
/* check for a remote label */
|
/* check for a remote label */
|
||||||
if (fnh->remote_label == NO_LABEL)
|
if (fnh->remote_label == NO_LABEL)
|
||||||
return (0);
|
return (0);
|
||||||
@ -298,34 +295,6 @@ l2vpn_pw_ok(struct l2vpn_pw *pw, struct fec_nh *fnh)
|
|||||||
pw->remote_status != PW_FORWARDING)
|
pw->remote_status != PW_FORWARDING)
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
/* check for a working lsp to the nexthop */
|
|
||||||
memset(&fec, 0, sizeof(fec));
|
|
||||||
switch (pw->af) {
|
|
||||||
case AF_INET:
|
|
||||||
fec.type = FEC_TYPE_IPV4;
|
|
||||||
fec.u.ipv4.prefix = pw->addr.v4;
|
|
||||||
fec.u.ipv4.prefixlen = 32;
|
|
||||||
break;
|
|
||||||
case AF_INET6:
|
|
||||||
fec.type = FEC_TYPE_IPV6;
|
|
||||||
fec.u.ipv6.prefix = pw->addr.v6;
|
|
||||||
fec.u.ipv6.prefixlen = 128;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
fatalx("l2vpn_pw_ok: unknown af");
|
|
||||||
}
|
|
||||||
|
|
||||||
fn = (struct fec_node *)fec_find(&ft, &fec);
|
|
||||||
if (fn == NULL || fn->local_label == NO_LABEL)
|
|
||||||
return (0);
|
|
||||||
/*
|
|
||||||
* Need to ensure that there's a label binding for all nexthops.
|
|
||||||
* Otherwise, ECMP for this route could render the pseudowire unusable.
|
|
||||||
*/
|
|
||||||
LIST_FOREACH(fnh, &fn->nexthops, entry)
|
|
||||||
if (fnh->remote_label == NO_LABEL)
|
|
||||||
return (0);
|
|
||||||
|
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user