aboutgitcodebugslistschat
path: root/virtio.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2024-12-20 12:40:29 +0100
committerStefano Brivio <sbrivio@redhat.com>2025-01-05 23:48:59 +0100
commit324233bd9b8baa3ec13a7425ea3ec7145e3ce645 (patch)
tree24b5a378bceab9dea4c7deb8949eeb181446e15e /virtio.c
parent2385b69a66807e32dca5ae17ab64686888e4c682 (diff)
downloadpasst-324233bd9b8baa3ec13a7425ea3ec7145e3ce645.tar
passt-324233bd9b8baa3ec13a7425ea3ec7145e3ce645.tar.gz
passt-324233bd9b8baa3ec13a7425ea3ec7145e3ce645.tar.bz2
passt-324233bd9b8baa3ec13a7425ea3ec7145e3ce645.tar.lz
passt-324233bd9b8baa3ec13a7425ea3ec7145e3ce645.tar.xz
passt-324233bd9b8baa3ec13a7425ea3ec7145e3ce645.tar.zst
passt-324233bd9b8baa3ec13a7425ea3ec7145e3ce645.zip
udp_flow: Don't block multicast and broadcast messages
It was reported that SSDP notifications sent from a container (with e.g. minidlna) stopped appearing on the network starting from commit 1db4f773e87f ("udp: Improve detail of UDP endpoint sanity checking"). As a minimal reproducer using minidlnad(8): $ mkdir /tmp/minidlna $ cat conf media_dir=/tmp/minidlna db_dir=/tmp/minidlna $ ./pasta -d --config-net -- sh -c '/usr/sbin/minidlnad -p 31337 -S -f conf -P /dev/null & (sleep 1; killall minidlnad)' [...] 1.0327: Flow 0 (NEW): FREE -> NEW 1.0327: Flow 0 (INI): NEW -> INI 1.0327: Flow 0 (INI): TAP [88.198.0.164]:54185 -> [239.255.255.250]:1900 => ? 1.0327: Flow 0 (INI): Invalid endpoint on UDP packet 1.0327: Flow 0 (FREE): INI -> FREE 1.0328: Flow 0 (FREE): TAP [88.198.0.164]:54185 -> [239.255.255.250]:1900 => ? 1.0328: Dropping datagram with no flow TAP 88.198.0.164:54185 -> 239.255.255.250:1900 This is an actual regression as there's no particular reason to block outbound multicast UDP packets. And even if we don't handle multicast groups in any particular way (https://bugs.passt.top/show_bug.cgi?id=2, "Add IGMP/MLD proxy"), there's no reason to block inbound multicast or broadcast packets either, should they ever be somehow delivered to passt or pasta. Let multicast and broadcast packets through, refusing only to establish flows with unspecified endpoint, as those would actually cause havoc in the flow table. IP-wise, SSDP notifications look like this (after this patch), inside and outside: $ pasta -p /tmp/minidlna.pcap --config-net -- sh -c '/usr/sbin/minidlnad -p 31337 -S -f minidlna.conf -P /dev/null & (sleep 1; killall minidlnad)' [...] $ tshark -a packets:1 -r /tmp/minidlna.pcap ssdp 2 0.074808 88.198.0.164 ? 239.255.255.250 SSDP 200 NOTIFY * HTTP/1.1 # tshark -i ens3 -a packets:1 multicast 2>/dev/null 1 0.000000000 88.198.0.164 ? 239.255.255.250 SSDP 200 NOTIFY * HTTP/1.1 Link: https://github.com/containers/podman/issues/24871 Fixes: 1db4f773e87f ("udp: Improve detail of UDP endpoint sanity checking") Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'virtio.c')
0 files changed, 0 insertions, 0 deletions