Index | Thread | Search

From:
Claudio Jeker <cjeker@diehard.n-r-g.com>
Subject:
multicast(4): reduce confusion about MRT_INIT
To:
tech@openbsd.org
Date:
Thu, 5 Nov 2026 11:11:14 +0100

Download raw body.

Thread
  • Claudio Jeker:

    multicast(4): reduce confusion about MRT_INIT

MRT_INIT and MRT6_INIT only support a value of 1 in v.
Using any other value results in an error with errno EINVAL.
This thing of using 0 to disable multicast routing is just a myth.

-- 
:wq Claudio

Index: multicast.4
===================================================================
RCS file: /cvs/src/share/man/man4/multicast.4,v
diff -u -p -r1.17 multicast.4
--- multicast.4	23 Jan 2024 08:20:30 -0000	1.17
+++ multicast.4	5 Nov 2026 10:07:37 -0000
@@ -137,12 +137,12 @@ After the multicast routing socket is op
 or disable multicast forwarding in the kernel:
 .Bd -literal -offset 5n
 /* IPv4 */
-int v = 1;        /* 1 to enable, or 0 to disable */
+int v = 1;
 setsockopt(mrouter_s4, IPPROTO_IP, MRT_INIT, &v, sizeof(v));
 .Ed
 .Bd -literal -offset 5n
 /* IPv6 */
-int v = 1;        /* 1 to enable, or 0 to disable */
+int v = 1;
 setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_INIT, &v, sizeof(v));
 \&...
 /* If necessary, filter all ICMPv6 messages */