According to the documentation of SetMulticastTTL and SetTOS new values will be applied to "future outgoing multicast packets". However on MacOS the last set value is applied on all outgoing packets that are still in the buffer ((that is an assumption from my side). When I add delays between the subsequent WriteTo calls the tcpdump output shows the correct values for tos and ttl. However, without these delays setting the ToS and TTL could affect previously sent packets.
On Linux the results are as expected from the documentation.
Go version
go version go1.22.3 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
What did you see happen?
What did you expect to see?
According to the documentation of SetMulticastTTL and SetTOS new values will be applied to "future outgoing multicast packets". However on MacOS the last set value is applied on all outgoing packets that are still in the buffer ((that is an assumption from my side). When I add delays between the subsequent
WriteTo
calls thetcpdump
output shows the correct values fortos
andttl
. However, without these delays setting theToS
andTTL
could affect previously sent packets.On Linux the results are as expected from the documentation.