Repository navigation
feat: Remove unneeded multicast send tracking - #377
Conversation
This became obsolete with keepsimple1#373, as we now only use at max one IPv4 and at max one IPv6 address per interface.
|
I've played around with an added Counter for skipped multicast, and additional added addresses on the network interface and the counter never actually increased so I guess it is safe to remove that feature. |
|
|
||
| let mut outgoing_intfs = Vec::new(); | ||
|
|
||
| for intf in self.my_intfs.iter() { |
There was a problem hiding this comment.
Although I would love to see any removal of unneeded code, I don't find the original issue (in #239) was gone.
It's true we no longer have separate sock for each intf, and use the common ipv4_sock and ipv6_sock. But we are still looping through self.my_intfs here, and if an interface has multiple addresses, multiple intf will show up and we will send out packet for each of them.
Maybe I've missed something, please let me know.
There was a problem hiding this comment.
As far as I understand the following loop:
Line 969 in 8cb1a59
There was a problem hiding this comment.
You are correct 👍 . I didn't realize that case, which would render the concerned code unneeded.
…ses (#380) This is triggered by #377 as currently we would skip 2nd IP address on an interface due to join_multicast_group error on the same interface. Strictly speaking, this is wrong and it can cause confusion in debugging as addr 1 is in ZeroConf.my_intfs but addr 2 (on the same interface) is not. Also, currently we directly use Interface from if-addrs crate, but it is per address, not truly per interface. I took this opportunity to define a new interface struct for us MyIntf that represents a network interface that supports multiple addresses. The diff is very extensive but conceptually really just Interface is replaced by MyIntf.
This became obsolete with #373, as we now only use at max one IPv4 and at max one IPv6 address per interface. This pr reverts #239