From nobody Mon Apr 29 19:03:06 2024 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VSyBJ6G1qz5JxHp for ; Mon, 29 Apr 2024 22:07:52 +0000 (UTC) (envelope-from dirkx@webweaving.org) Received: from weser.webweaving.org (weser.webweaving.org [148.251.234.232]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "weser.webweaving.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VSyBJ2hWXz41s8 for ; Mon, 29 Apr 2024 22:07:52 +0000 (UTC) (envelope-from dirkx@webweaving.org) Authentication-Results: mx1.freebsd.org; none Received: from smtpclient.apple (fiber.static.cbizz.nl [185.142.248.117] (may be forged)) (authenticated bits=0) by weser.webweaving.org (8.17.1/8.17.1) with ESMTPA id 43TJ3HJR040485; Mon, 29 Apr 2024 21:03:18 +0200 (CEST) (envelope-from dirkx@webweaving.org) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=webweaving.org; s=shared; t=1714417400; bh=T+6U5QUbDp1mKi+8QBEviR4L9OlTIQZGNyeSbOtDgVk=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=OH/emFIeiKevMIyxoa3Jv2XCxh0hd3JUjdUuOSg5SsCgNWFIaMgm6DirG65s/qXtu QIoZ6evSQwJqk3AEFwIuJ+bBsh9Uhlv+ZEkSg8xq/AUwS/CzvXVsFu635KWQob4xfc rcwF/ojzv23O2r23f3qqu1pP50FNQ2u18Wega0JU= X-Authentication-Warning: weser.webweaving.org: Host fiber.static.cbizz.nl [185.142.248.117] (may be forged) claimed to be smtpclient.apple Content-Type: text/plain; charset=utf-8 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\)) Subject: Re: Multicast & Tunnel devices From: Dirk-Willem van Gulik In-Reply-To: <202404291752.43THqS5l074359@gndrsh.dnsmgr.net> Date: Mon, 29 Apr 2024 21:03:06 +0200 Cc: FreeBSD Hackers Content-Transfer-Encoding: quoted-printable Message-Id: <8398E49B-629D-4199-BBF8-434E62AA36DB@webweaving.org> References: <202404291752.43THqS5l074359@gndrsh.dnsmgr.net> To: "Rodney W. Grimes" X-Mailer: Apple Mail (2.3774.500.171.1.1) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (weser.webweaving.org [148.251.234.232]); Mon, 29 Apr 2024 21:03:20 +0200 (CEST) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:148.251.0.0/16, country:DE] X-Rspamd-Queue-Id: 4VSyBJ2hWXz41s8 On 29 Apr 2024, at 19:52, Rodney W. Grimes = wrote: >>> On 29 Apr 2024, at 03:09, Rodney W. Grimes = wrote: >>>=20 >>>> Would anyone know if there is something special with tunnel devices = and multicast ?=20 >>>>=20 >>>> I?ve got some code that happily processes multicast packets on a = normal interface; but appears not to do this on a tunnel interface. Tun0 = shows multicast enabled: >>>> =09 >>>> tun0: flags=3D8043 metric 0 mtu = 1500 >>>>=20 >>>> Tcpdump on that interface gives the expected thing (here with = mDNS): >>>>=20 >>>> tcpdump -n -i tun0 port 5353 >>>> listening on tun0, link-type NULL (BSD loopback), capture size = 262144 bytes >>>> 19:26:03.976259 IP 10.31.0.6.5353 > 224.0.0.251.5353: 0 PTR = (QM)? _raop._tcp.local. (34) >>>>=20 >>>> And code, with a simple IP_ADD_MEMBERSHIP of the MC group on the = IP of the local interface below works on a normal interface (e.g. = igb0/10.0.0.1/24).=20 >>>>=20 >>>> ./listener 10.0.0.1 224.0.0.251 5353 >>>=20 >>> Is 10.0.0.1 the IP address of tun0, or is it the address of some = other interface? >>> I suspect that the IP address of the tun0 interface is 10.31.0.6 = from your tcpdump above. >>=20 >> That is correct 10.0.0.1/8. 10.31.0.6 is another machine at the other = end of the tunnel broadcasting. Thanks for your reply - it did make play with the several /30=E2=80=99s = aliases I was running in parallel on tun0. And found by accident that if I remove them - things spring to life. = Which is actually possible - as I can split the tun0 up into 8 separate = /24=E2=80=99s tunnels; one for each connection pair. With that - = IP_ADD_MEMBERSHIP does exactly what it says on the tin. Dw