From eaaea73bf128ec4ce7ab38a32391a68f2c885773 Mon Sep 17 00:00:00 2001 From: Jeff Weston Date: Fri, 19 May 2023 15:53:20 -0400 Subject: [PATCH] Change NORM to set TTL using MULTICAST_HOPS sockopt (#4552) * Change NORM to set TTL using MULTICAST_HOPS instead of hard-coding. Changes default TTL from 255 to 1. --- src/norm_engine.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/norm_engine.cpp b/src/norm_engine.cpp index cc77b8b3..fbda2f3f 100644 --- a/src/norm_engine.cpp +++ b/src/norm_engine.cpp @@ -133,10 +133,7 @@ int zmq::norm_engine_t::init (const char *network_, bool send, bool recv) // There's many other useful NORM options that could be applied here if (!NormIsUnicastAddress (addr)) { // These only apply for multicast sessions - //NormSetTTL(norm_session, options.multicast_hops); // ZMQ default is 1 - NormSetTTL ( - norm_session, - 255); // since the ZMQ_MULTICAST_HOPS socket option isn't well-supported + NormSetTTL (norm_session, options.multicast_hops); NormSetRxPortReuse ( norm_session, true); // port reuse doesn't work for non-connected unicast