]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ldpd: add a few warning messages to aid in troubleshooting
authorRenato Westphal <renato@opensourcerouting.org>
Wed, 29 Nov 2017 19:11:28 +0000 (17:11 -0200)
committerßingen <bingen@voltanet.io>
Wed, 27 Dec 2017 11:17:05 +0000 (12:17 +0100)
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
ldpd/l2vpn.c

index 33c3d713a33bfb673c6bd8b0879501ef9b51125c..2a3a5d97c142edd7d3901f2f087e62856cf55466 100644 (file)
@@ -294,17 +294,26 @@ int
 l2vpn_pw_ok(struct l2vpn_pw *pw, struct fec_nh *fnh)
 {
        /* check for a remote label */
-       if (fnh->remote_label == NO_LABEL)
+       if (fnh->remote_label == NO_LABEL) {
+               log_warnx("%s: pseudowire %s: no remote label", __func__,
+                         pw->ifname);
                return (0);
+       }
 
        /* MTUs must match */
-       if (pw->l2vpn->mtu != pw->remote_mtu)
+       if (pw->l2vpn->mtu != pw->remote_mtu) {
+               log_warnx("%s: pseudowire %s: MTU mismatch detected", __func__,
+                         pw->ifname);
                return (0);
+       }
 
        /* check pw status if applicable */
        if ((pw->flags & F_PW_STATUSTLV) &&
-           pw->remote_status != PW_FORWARDING)
+           pw->remote_status != PW_FORWARDING) {
+               log_warnx("%s: pseudowire %s: remote end is down", __func__,
+                         pw->ifname);
                return (0);
+       }
 
        return (1);
 }