As discussed on IRC and Gerrit, this isn't so easy to trigger - you need
a setup that is using compression, *and* it can not be "comp-lzo", but
one of the other variants (lz4, stub[-v1]), *and* then you need 2+ clients,
sending multicast pings from the server ("ping -I tun2 224.0.0.1") because
tun mode does not have broadcast handling at all...  but if you have all
that, packets indeed arrive damaged on the client, and tcpdump shows:

   11:57:46.681645 IP15 (invalid)

- with the patch, nice and shiny.  The BSDs even reply, so you can
see the success right away

$ ping -I tun2 224.0.0.1
PING 224.0.0.1 (224.0.0.1) from 10.204.3.1 tun2: 56(84) bytes of data.
64 bytes from 10.204.3.2: icmp_seq=1 ttl=64 time=0.596 ms
64 bytes from 10.204.3.10: icmp_seq=1 ttl=64 time=6.32 ms

I have not tested TAP, but stare-at-code confirms that TAP mode does
multicast *and* broadcast, and since the subsequent packet handling
all goes via multi_bcast() (for both types), I'm reasonably sure that
the problem & fix apply to both.

I have not dug into the intricacies of mbuf_alloc_buf() and so forth,
but it looks like properly refcounted and such...

Your patch has been applied to the master and release/2.7 branch
(bugfix!).  I'm not backporting to 2.6, 2.5, and earlier...

commit 83fb30bb7cb1bb10292695877485a9be679e7870 (master)
commit 7ff88ba735d4777feef1915af2c4d52597feaffb (release/2.7)
Author: Razvan Cojocaru
Date:   Tue Dec 1 15:28:04 2026 +0100

     multi: don't let compression corrupt queued broadcast packets

     Signed-off-by: Razvan Cojocaru <[email protected]>
     Acked-by: Antonio Quartulli <[email protected]>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2377
     Message-Id: <[email protected]>
     URL: 
https://www.mail-archive.com/[email protected]/msg42300.html
     Signed-off-by: Gert Doering <[email protected]>


--
kind regards,

Gert Doering



_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to