If multicast-relay is used with the --ssdpUnicastAddr option, all relayed SSDP multicast packets are logged with ssdpUnicastAddr:SSDP_UNICAST_PORT as source instead of the original address and port.
Steps to reproduce: run multicast-relay.py --verbose --foreground --interfaces $IFACE1 $IFACE2 --ssdpUnicastAddr $IFACE1_ADDR, send SSDP multicast packets from another machine connected to the same network
Expected behaviour: original source address is logged
Actual behaviour:$IFACE1_ADDR is logged instead of original address
Log example (with options --interfaces eth0 eth1 --ssdpUnicastAddr 192.168.0.123)
...
INFO: Last SSDP search source: 10.0.0.11:43028
INFO: [SSDP] Relayed 125 bytes from 192.168.0.123:1901 on eth1 [ttl 1] to 239.255.255.250:1900 via eth0/192.168.0.123
...
INFO: Last SSDP search source: 192.168.1.100:1900
INFO: [SSDP] Relayed 409 bytes from 192.168.0.123:1901 on eth0 [ttl 4] to 239.255.255.250:1900 via eth1/10.0.0.123
Log example (678bafb, same options)
Last SSDP search source: 10.0.0.11:40074
INFO: [SSDP] Relayed 125 bytes from 10.0.0.11(192.168.0.123):1901 on eth1 [ttl 1] to 239.255.255.250:1900 via eth0/192.168.0.123
Possible solutions:
Log origSrcAddr and origSrcPort instead of srcAddr / srcPort
Log both origSrcAddr / origSrcPort and srcAddr / srcPort (see second log example)
If multicast-relay is used with the
--ssdpUnicastAddr
option, all relayed SSDP multicast packets are logged withssdpUnicastAddr:SSDP_UNICAST_PORT
as source instead of the original address and port.Steps to reproduce: run
multicast-relay.py --verbose --foreground --interfaces $IFACE1 $IFACE2 --ssdpUnicastAddr $IFACE1_ADDR
, send SSDP multicast packets from another machine connected to the same networkExpected behaviour: original source address is logged
Actual behaviour:
$IFACE1_ADDR
is logged instead of original addressRelevant part of code: https://github.com/alsmith/multicast-relay/blob/74a0fc165e393e2ff11d6d3137d791935bb7eab7/multicast-relay.py#L684-L689
Log example (with options
--interfaces eth0 eth1 --ssdpUnicastAddr 192.168.0.123
)Log example (678bafb, same options)
Possible solutions:
origSrcAddr
andorigSrcPort
instead ofsrcAddr
/srcPort
origSrcAddr
/origSrcPort
andsrcAddr
/srcPort
(see second log example)