diff options
Diffstat (limited to 'zebra/irdp_main.c')
| -rw-r--r-- | zebra/irdp_main.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/zebra/irdp_main.c b/zebra/irdp_main.c index b868d23a94..936206641f 100644 --- a/zebra/irdp_main.c +++ b/zebra/irdp_main.c @@ -175,7 +175,6 @@ static void irdp_send(struct interface *ifp, struct prefix *p, struct stream *s) { struct zebra_if *zi = ifp->info; struct irdp_interface *irdp = zi->irdp; - char buf[PREFIX_STRLEN]; uint32_t dst; uint32_t ttl = 1; @@ -190,10 +189,11 @@ static void irdp_send(struct interface *ifp, struct prefix *p, struct stream *s) dst = htonl(INADDR_ALLHOSTS_GROUP); if (irdp->flags & IF_DEBUG_MESSAGES) - zlog_debug("IRDP: TX Advert on %s %s Holdtime=%d Preference=%d", - ifp->name, prefix2str(p, buf, sizeof(buf)), - irdp->flags & IF_SHUTDOWN ? 0 : irdp->Lifetime, - get_pref(irdp, p)); + zlog_debug( + "IRDP: TX Advert on %s %pFX Holdtime=%d Preference=%d", + ifp->name, p, + irdp->flags & IF_SHUTDOWN ? 0 : irdp->Lifetime, + get_pref(irdp, p)); send_packet(ifp, s, dst, p, ttl); } @@ -263,9 +263,7 @@ void irdp_advert_off(struct interface *ifp) if (!irdp) return; - if (irdp->t_advertise) - thread_cancel(irdp->t_advertise); - irdp->t_advertise = NULL; + thread_cancel(&irdp->t_advertise); if (ifp->connected) for (ALL_LIST_ELEMENTS(ifp->connected, node, nnode, ifc)) { @@ -300,9 +298,7 @@ void process_solicit(struct interface *ifp) return; irdp->flags |= IF_SOLICIT; - if (irdp->t_advertise) - thread_cancel(irdp->t_advertise); - irdp->t_advertise = NULL; + thread_cancel(&irdp->t_advertise); timer = (frr_weak_random() % MAX_RESPONSE_DELAY) + 1; |
