From: "Ignjatović, Lazar (RS)" <Lazar.Ignjatovic@cubic.com> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH v2] avformat: enable UDP IPv6 multicast interface selection Date: Fri, 22 Mar 2024 09:31:28 +0000 Message-ID: <AS8P193MB19975C6960595DF30267B5A78D312@AS8P193MB1997.EURP193.PROD.OUTLOOK.COM> (raw) In-Reply-To: <8072287.ikfbygDpP0@basile.remlab.net> >> I've compared ffmpeg 5.1.2 against my MR on IPv6 multicast. Here are >> the >> results: > > I don't care. That does not make your MR any less counter-sensical. If I may cite Marton Balint ``` d3bda871f033be4825ecb69d444b3396bf2a2eb7 avformat/udp: specify the local address for some source filtered multicast joins We already use localaddr for the multicast joins without source filters, so we should use them for source filters as well. This patch only fixes the IP_ADD_SOURCE_MEMBERSHIP and the IP_BLOCK_SOURCE case. Unless we do this, the kernel automatically selects an interface based on the source address, and that interface might be different from the one set in localaddr. For blocked sources this even casues EINVAL because we joined the multicast group on a different interface. Signed-off-by: Marton Balint <cus@passwd.hu> --- ... //TODO: Interface index should be looked up from local_addr ... ``` And another commit ``` ab0812c1a8925a95315354b88b41256faad5faa8 avformat/udp: always use IP_ADD_SOURCE_MEMBERSHIP for subscribing to an UDP multicast source group in IPv4 That alone supports specifying the interface based on its address. Getting the interface index from the local address seems quite a bit of work in a platform independent way... Obviously for IPv6 we still always use MCAST_JOIN_SOURCE_GROUP. As a side effect this also fixes ticket #7459. Signed-off-by: Marton Balint <cus@passwd.hu> ``` From this I understand that the intention is to still use localaddr parameter with the same semantics as with IPv4 > If you could infer the scope ID from the IPv6 address, there wouldn't be a > scope ID field in the socket address in the first place. Is it that hard to > understand? Well, it's not that simple. Here I have to cite ipv6(7) — Linux manual page ``` sin6_scope_id is an ID depending on the scope of the address. It is new in Linux 2.4. Linux supports it only for link-local addresses, in that case sin6_scope_id contains the interface index (see netdevice(7)) ``` > That "problem" was solved before FFmpeg existed by adding a separate parameter > (ping6) or prepending the interface name after a percent sign (glibc). And this is the closest you've got to providing an alternate solution to the proposed. Which is adding another parameter, or relying on % for every type of multicast. > If you tests show anything, it's that LL addressing is not intended for application protocols. And just to clarify FF11::1%eth0 is an interface-local multicast, thus supported FF12::1%eth0 is a link-local multicast, thus supported All other multicast scopes are not supported by Linux in respect to %scope. If we choose to support ff15::1%eth0 for example, we are introducing something that is not normally supported on Linux, potentially creating confusion among users. Interface parameter seems like a better option than the %scope for everything. Can someone else agree with this? If this is, in fact, the preferred way, then okay. I will propose the v3 of the patch done this way. Still, I prefer keeping the IPv4 semantics for v6. Lazar Ignjatović Associate Software Engineer Cubic Defense cubic.com This message has been marked as Public on 03/22/2024 09:31Z. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2024-03-22 9:31 UTC|newest] Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-14 12:04 [FFmpeg-devel] [PATCH] " Ignjatović, Lazar (RS) 2024-03-14 21:13 ` Michael Niedermayer 2024-03-18 13:45 ` Ignjatović, Lazar (RS) 2024-03-19 1:23 ` Michael Niedermayer 2024-03-20 9:28 ` [FFmpeg-devel] [PATCH v2] " Ignjatović, Lazar (RS) 2024-03-20 10:51 ` Rémi Denis-Courmont 2024-03-20 11:09 ` Ignjatović, Lazar (RS) 2024-03-20 11:29 ` Rémi Denis-Courmont 2024-03-20 11:45 ` Ignjatović, Lazar (RS) 2024-03-20 12:17 ` Rémi Denis-Courmont 2024-03-20 12:35 ` Ignjatović, Lazar (RS) 2024-03-21 7:26 ` Rémi Denis-Courmont 2024-03-21 13:01 ` Ignjatović, Lazar (RS) 2024-03-21 19:44 ` Rémi Denis-Courmont 2024-03-22 9:31 ` Ignjatović, Lazar (RS) [this message] 2024-03-22 9:55 ` Rémi Denis-Courmont 2024-03-22 10:16 ` Ignjatović, Lazar (RS) 2024-03-26 12:34 ` [FFmpeg-devel] [PATCH v3] avformat: enable UDP IPv6 multicast interface selection using localaddr Ignjatović, Lazar (RS) 2024-03-26 18:25 ` Rémi Denis-Courmont 2024-03-27 8:53 ` Ignjatović, Lazar (RS) 2024-03-27 15:31 ` Rémi Denis-Courmont 2024-03-27 15:38 ` [FFmpeg-devel] [PATCH v2] avformat: enable UDP IPv6 multicast interface selection using zone index Ignjatović, Lazar (RS) 2024-04-11 7:45 ` Ignjatović, Lazar (RS) 2024-04-11 7:50 ` Lynne 2024-04-11 7:58 ` Ignjatović, Lazar (RS) 2024-04-11 13:01 ` [FFmpeg-devel] [PATCH v3] " Ignjatović, Lazar (RS) 2024-04-19 10:23 ` Ignjatović, Lazar (RS) 2024-04-28 18:15 ` [FFmpeg-devel] [PATCH v2] " Rémi Denis-Courmont 2024-04-28 20:11 ` Lynne 2024-04-29 7:33 ` Rémi Denis-Courmont 2024-04-29 8:20 ` Lynne 2024-04-29 9:56 ` Rémi Denis-Courmont 2024-04-29 10:32 ` Lynne 2024-04-29 11:34 ` Rémi Denis-Courmont 2024-04-29 12:03 ` Lynne 2024-04-29 0:01 ` Brad Smith 2024-03-26 12:34 ` [FFmpeg-devel] [PATCH] " Ignjatović, Lazar (RS) 2024-03-26 18:24 ` [FFmpeg-devel] [PATCH v2] avformat: enable UDP IPv6 multicast interface selection Rémi Denis-Courmont
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=AS8P193MB19975C6960595DF30267B5A78D312@AS8P193MB1997.EURP193.PROD.OUTLOOK.COM \ --to=lazar.ignjatovic@cubic.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git