]> git.proxmox.com Git - mirror_frr.git/blobdiff - ldpd/hello.c
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / ldpd / hello.c
index 327cb32434afb0578a7999babf341ba3ed7d92a9..83c0b2f8ca00c981a571a090bf5f45df18d617ee 100644 (file)
@@ -1,20 +1,9 @@
+// SPDX-License-Identifier: ISC
 /*     $OpenBSD$ */
 
 /*
  * Copyright (c) 2013, 2016 Renato Westphal <renato@openbsd.org>
  * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
 #include <zebra.h>
@@ -67,7 +56,8 @@ send_hello(enum hello_type type, struct iface_af *ia, struct tnbr *tnbr)
                af = tnbr->af;
                holdtime = tnbr_get_hello_holdtime(tnbr);
                flags = F_HELLO_TARGETED;
-               if ((tnbr->flags & F_TNBR_CONFIGURED) || tnbr->pw_count)
+               if ((tnbr->flags & F_TNBR_CONFIGURED) || tnbr->pw_count
+                   || tnbr->rlfa_count)
                        flags |= F_HELLO_REQ_TARG;
                fd = (ldp_af_global_get(&global, af))->ldp_edisc_socket;
 
@@ -414,13 +404,13 @@ recv_hello(struct in_addr lsr_id, struct ldp_msg *msg, int af,
                if (holdtime == 0)
                        holdtime = LINK_DFLT_HOLDTIME;
 
-               adj->holdtime = min(if_get_hello_holdtime(ia), holdtime);
+               adj->holdtime = MIN(if_get_hello_holdtime(ia), holdtime);
                break;
        case HELLO_TARGETED:
                if (holdtime == 0)
                        holdtime = TARGETED_DFLT_HOLDTIME;
 
-               adj->holdtime = min(tnbr_get_hello_holdtime(tnbr), holdtime);
+               adj->holdtime = MIN(tnbr_get_hello_holdtime(tnbr), holdtime);
        }
        if (adj->holdtime != INFINITE_HOLDTIME)
                adj_start_itimer(adj);