]> git.puffer.fish Git - mirror/frr.git/commitdiff
ldpd: no need to synchronize pseudowires with LSPs anymore
authorRenato Westphal <renato@opensourcerouting.org>
Thu, 30 Mar 2017 23:19:16 +0000 (20:19 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Fri, 31 Mar 2017 14:12:39 +0000 (11:12 -0300)
Since commit 595b4be, the l2vpn_pw_ok() function doesn't check if there's
a working LSP to the remote end of the pseudowire (we assume that zebra
will do that for us). With that said, the l2vpn_sync_pws() function is
not necessary anymore.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
ldpd/l2vpn.c
ldpd/lde.c
ldpd/lde.h

index ca40636e09df93e01954268eb1cae5602cc61c90..bdfcd420ebaba58918ff7d244b9bb1c22d1c0f59 100644 (file)
@@ -463,37 +463,6 @@ l2vpn_recv_pw_status_wcard(struct lde_nbr *ln, struct notify_msg *nm)
        }
 }
 
-void
-l2vpn_sync_pws(int af, union ldpd_addr *addr)
-{
-       struct l2vpn            *l2vpn;
-       struct l2vpn_pw         *pw;
-       struct fec               fec;
-       struct fec_node         *fn;
-       struct fec_nh           *fnh;
-
-       RB_FOREACH(l2vpn, l2vpn_head, &ldeconf->l2vpn_tree) {
-               RB_FOREACH(pw, l2vpn_pw_head, &l2vpn->pw_tree) {
-                       if (af != pw->af || ldp_addrcmp(af, &pw->addr, addr))
-                               continue;
-
-                       l2vpn_pw_fec(pw, &fec);
-                       fn = (struct fec_node *)fec_find(&ft, &fec);
-                       if (fn == NULL)
-                               continue;
-                       fnh = fec_nh_find(fn, AF_INET, (union ldpd_addr *)
-                           &pw->lsr_id, 0, 0);
-                       if (fnh == NULL)
-                               continue;
-
-                       if (l2vpn_pw_ok(pw, fnh))
-                               lde_send_change_klabel(fn, fnh);
-                       else
-                               lde_send_delete_klabel(fn, fnh);
-               }
-       }
-}
-
 void
 l2vpn_pw_ctl(pid_t pid)
 {
index 53fde32fd9ceb7af638aef6b44f8e4d0e8755882..bc808e68412f20ebfb55f76cdadec81eeca0d023 100644 (file)
@@ -725,10 +725,6 @@ lde_send_change_klabel(struct fec_node *fn, struct fec_nh *fnh)
 
                lde_imsg_compose_parent(IMSG_KLABEL_CHANGE, 0, &kr,
                    sizeof(kr));
-
-               if (fn->fec.u.ipv4.prefixlen == 32)
-                       l2vpn_sync_pws(AF_INET, (union ldpd_addr *)
-                           &fn->fec.u.ipv4.prefix);
                break;
        case FEC_TYPE_IPV6:
                memset(&kr, 0, sizeof(kr));
@@ -743,10 +739,6 @@ lde_send_change_klabel(struct fec_node *fn, struct fec_nh *fnh)
 
                lde_imsg_compose_parent(IMSG_KLABEL_CHANGE, 0, &kr,
                    sizeof(kr));
-
-               if (fn->fec.u.ipv6.prefixlen == 128)
-                       l2vpn_sync_pws(AF_INET6, (union ldpd_addr *)
-                           &fn->fec.u.ipv6.prefix);
                break;
        case FEC_TYPE_PWID:
                if (fn->local_label == NO_LABEL ||
@@ -792,10 +784,6 @@ lde_send_delete_klabel(struct fec_node *fn, struct fec_nh *fnh)
 
                lde_imsg_compose_parent(IMSG_KLABEL_DELETE, 0, &kr,
                    sizeof(kr));
-
-               if (fn->fec.u.ipv4.prefixlen == 32)
-                       l2vpn_sync_pws(AF_INET, (union ldpd_addr *)
-                           &fn->fec.u.ipv4.prefix);
                break;
        case FEC_TYPE_IPV6:
                memset(&kr, 0, sizeof(kr));
@@ -810,10 +798,6 @@ lde_send_delete_klabel(struct fec_node *fn, struct fec_nh *fnh)
 
                lde_imsg_compose_parent(IMSG_KLABEL_DELETE, 0, &kr,
                    sizeof(kr));
-
-               if (fn->fec.u.ipv6.prefixlen == 128)
-                       l2vpn_sync_pws(AF_INET6, (union ldpd_addr *)
-                           &fn->fec.u.ipv6.prefix);
                break;
        case FEC_TYPE_PWID:
                pw = (struct l2vpn_pw *) fn->data;
index d1089b44f46edabf3cede6ec6c3abbaeaf3e286c..8ee62b02d36a06469b0fa1ddb4b13899a2b10c4d 100644 (file)
@@ -231,7 +231,6 @@ void                 l2vpn_send_pw_status_wcard(struct lde_nbr *, uint32_t,
 void            l2vpn_recv_pw_status(struct lde_nbr *, struct notify_msg *);
 void            l2vpn_recv_pw_status_wcard(struct lde_nbr *,
                    struct notify_msg *);
-void            l2vpn_sync_pws(int, union ldpd_addr *);
 void            l2vpn_pw_ctl(pid_t);
 void            l2vpn_binding_ctl(pid_t);