Ticket #265 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

autoipd breakage when it sees its own ARPs

Reported by: npmccallum Owned by: lennart
Milestone: Avahi 0.6.26 Component: avahi-autoipd
Keywords: Cc: aboyer@…

Description

In the case where you have a system connected to a hub which returns packets to the sender, autoipd always lists every IP address as taken, even when it isn't. The attached patch fixes this problem by ignoring conflicts when the packet is generated by the local address. I cannot think of any downsides to this approach.

Attachments

avahi-autoipd-fixhub.patch Download (1.2 KB) - added by npmccallum 4 years ago.
updated patch

Change History

Changed 4 years ago by lennart

Hmm, sounds reasonable. But, hmm, what kind of weird hub is this?

Changed 4 years ago by lennart

Using memcmp() for that comparison is probably a better idea though. Also it might be an idea log about weird responses like that.

Changed 4 years ago by npmccallum

updated patch

Changed 4 years ago by npmccallum

I've updated the patch with your suggestions. Thanks for the hint on memcpy, I'm not quite sure how I never learned about that function. Oh well.

Changed 4 years ago by lennart

memcmp, not memcpy!

Changed 4 years ago by npmccallum

Oops! Can you fix my typo? or do you need a new patch?

Changed 4 years ago by lennart

Thanks, I'll fix it when I merge it. It's easy enough.

Changed 4 years ago by npmccallum

Any chance this can be merged? Its holding up a project I'm working on. It would be great if we could get it into the Fedora RPMs as well.

Changed 4 years ago by npmccallum

Any update? This should be a simple merge.

Changed 4 years ago by lennart

Yes, I will merge this. Please be patient. I am waiting for more fixes however before I will do a new release. And usually before I sit down and do the release I will merge them all.

Changed 4 years ago by lennart

  • milestone set to Avahi 0.6.26

Changed 4 years ago by lennart

BTW, I am still wondering what kind of weird hw you have that responds all packets back?

Changed 4 years ago by npmccallum

Its an old no-name hub I bought at a computer fair back in the day...

Changed 3 years ago by aboyer

  • cc aboyer@… added
  • summary changed from autoipd breakage on hubs which return packets to autoipd breakage when it sees its own ARPs

Chiming in in support of this patch: I am experiencing a similar situation in which avahi-autoipd is incorrectly detecting conflicts on FreeBSD. It picks an address and moves to the background. When I try to ping it, Avahi sees the arp reply and changes addresses.

I'm not privy to the whole network configuration, but the system is connected directly to a 10Gbit Arista switch. We've got changes in that force all loopback packets out onto the wire, but I don't know if that's related.

The patch attached to this bug (well, with memcmp()) solves the problem. Please incorporate it into your next release.

Thank you!

Changed 3 years ago by lennart

  • status changed from new to closed
  • resolution set to fixed

Fixed and applied. Thank you!

Note: See TracTickets for help on using tickets.