avahi-autoipd breakage on hubs which return packets

Bug #368173 reported by Andres Rodriguez
6
Affects Status Importance Assigned to Milestone
avahi (Ubuntu)
Invalid
Low
Unassigned

Bug Description

From avahi ticket (http://avahi.org/ticket/265) :

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.

IMPACT:
The impact will we that if we try to use avahi-autoipd with a hub, or in virtual environments, such as qemu/kvm using multicast networking, we won't be able to assign an IP address with avahi-autoipd, since it will think the address is already taken.

TEST CASE:
To reproduce this, we are going to use a virtual machine with KVM, having two interfaces in the VM. eth0 will handle Internet connectivity and eth1 will be used for avahi-autoipd tests.

1. Create disk for VM:
    - qemu-img create ubuntu.img 2G

2. Create the VM and install Ubuntu:
    - kvm -name ubuntu1 -hda ubuntu.img -m 256 -net nic,vlan=0,macaddr=52:54:00:12:34:22,model=virtio -net user,vlan=0 -net nic,vlan=1,macaddr=52:54:00:12:34:33,model=virtio -net socket,vlan=1,mcast=230.0.0.1:1234 -cdrom /path/to/jaunty-server-amd64.iso -boot d

3. Run the VM:
    - kvm -name ubuntu1 -hda ubuntu.img -m 256 -net nic,vlan=0,macaddr=52:54:00:12:34:22,model=virtio -net user,vlan=0 -net nic,vlan=1,macaddr=52:54:00:12:34:33,model=virtio -net socket,vlan=1,mcast=230.0.0.1:1234

4. Install avahi-autoipd and try it:
    - sudo apt-get install avahi-autoipd
    - sudo -i # to have a root console.
    - avahi-autoipd eth1 # to assign an IP address to eth1 using avahi-autoipd.

avahi-autoipd will try to assign an address but it will conflict and i'll never assign the address since it will think that someone else already has it.

5. Install avahi-autoipd from my PPA (https://launchpad.net/~andreserl/+archive/ppa):
   - Once you update avahi from my PPA, you'll see that this issue has been fixed.

I have attached a debdiff containing the patch.

Revision history for this message
Andres Rodriguez (andreserl) wrote :

I'll work in this bug.

Changed in avahi (Ubuntu):
assignee: nobody → andreserl
status: New → Confirmed
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Ok, Attaching debdiff. I'll ask for a SRU.

description: updated
Changed in avahi (Ubuntu):
assignee: andreserl → nobody
Changed in avahi (Ubuntu):
importance: Undecided → Medium
status: Confirmed → In Progress
importance: Medium → Low
Revision history for this message
Steve Langasek (vorlon) wrote :

My understanding is that this patch has not yet been integrated upstream; and fundamentally, if your packets are being echoed back to you, you have a broken network topology, which causes any number of other problems. I don't think working around such a broken network topology in avahi-autoipd is an appropriate target for an SRU.

Changed in avahi (Ubuntu):
status: In Progress → Incomplete
Changed in avahi (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.