Ticket #161 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

avahi-autoipd takes forever to handle challenges on BSD

Reported by: zml Assigned to: lennart
Priority: major Milestone: Avahi 0.6.22
Component: avahi-autoipd Version:
Keywords: Cc:

Description

I did some rudimentary testing on autoipd between two vmware boxes running a FreeBSD 6.1 variant. I used the "-S" option to test the challenge/response part of the RFC, and autoipd just failed miserably. I did numerous tcpdumps and discovered that all the appropriate ARP packets were getting *sent*, but none were getting to recv_packet - until I had the patience to go get a cup of coffee and noticed a sudden burst of recv_packet activity.

Looks like poll() is still broken for BPF fds on BSD. My guess is that it only acts like there's stuff to read when the buffer is full (this is somewhat alluded to here: http://www.tcpdump.org/lists/workers/2001/05/msg00060.html, although that link suggests it should be fixed in modern BSDs).

I'm trying to find a workaround now (or "the right way for BSD").

Attachments

avahi_pcap_problems.patch (2.7 kB) - added by zml on 08/23/07 03:53:44.
Patch for above and ticket #160

Change History

08/23/07 02:52:59 changed by zml

Alright, I've got a workaround here, and after peeling the onion back a little further there are some other serious issues. After fixing it so that challenges work at all on my system, I discovered that every time I challenged, the original owner lost. The code does this:

err = pcap_compile(pp, &bpf,

"arp and ether dst ff:ff:ff:ff:ff:ff", 1, 0);

...which is pretty wrong. We need to watch for both dst f*f and a dst of the interface we're arp'ing from, otherwise we'll just ignore any probe responses.

I'll have a roll-up patch for this and ticket 160 out in a little bit (tonight or tomorrow).

08/23/07 03:53:44 changed by zml

  • attachment avahi_pcap_problems.patch added.

Patch for above and ticket #160

08/26/07 01:21:58 changed by lennart

  • owner changed from zml to lennart.
  • status changed from new to assigned.
  • component changed from avahi-core to avahi-autoipd.

Patch looks good to me. I will merge this however cannot test this if it actually works since I have not access to any BSD machine. I trust you on this!

08/26/07 01:22:08 changed by lennart

  • milestone set to Avahi 0.6.22.

12/16/07 21:46:41 changed by lennart

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [1589]) work around a couple of issues in BSD libpcap. Closes #160 #161. Patches from zml