The code above generates invalid, huge UDP packages.
The + data[ipHeaderLength:] adds the whole packet (all after the header). That summand needs to be removed.
So correct line should just look like:
ipHeader = data[:ipHeaderLength-8] + socket.inet_aton(srcAddr) + socket.inet_aton(dstAddr)
https://github.com/alsmith/multicast-relay/blob/503fc498894ede308ef98987f16fbcc68c87dc64/multicast-relay.py#L332
Hi!
The code above generates invalid, huge UDP packages. The
+ data[ipHeaderLength:]
adds the whole packet (all after the header). That summand needs to be removed.So correct line should just look like:
ipHeader = data[:ipHeaderLength-8] + socket.inet_aton(srcAddr) + socket.inet_aton(dstAddr)
Best regards
Tino