Bug 239609 - Please add full set of zeroconf routes to each interface
Please add full set of zeroconf routes to each interface
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
9
All Linux
medium Severity low
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
bzcl34nup
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-09 16:49 EDT by Lennart Poettering
Modified: 2014-03-16 23:06 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-04 11:36:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Lennart Poettering 2007-05-09 16:49:15 EDT
Currently ifup-eth adds a single zeroconf route to each interface.

To be fully compatible it should add two:

ip route add 169.254.0.0/16 dev ${REALDEVICE} metric 1000 scope link
ip route add default dev ${REALDEVICE} metric 1000 scope link

For an explanation what these routes do, please consult:

http://avahi.org/wiki/AvahiAutoipd#Routes
Comment 1 Bill Nottingham 2007-05-09 22:38:51 EDT
Is there any specific rationale of '1000' as a metric, other than 'very very high'?
Comment 2 Lennart Poettering 2007-05-10 05:41:11 EDT
No. It should just be "very, very high".

Apple uses 99 for those routes. And we're better than Apple. Hence 1000. ;-)
Comment 3 Bill Nottingham 2007-07-27 10:36:25 EDT
How does this work in the case of multiple active devices, and therefore having
multiple default routes with metric 1000?
Comment 4 Lennart Poettering 2007-07-30 10:38:01 EDT
Linux is fine with multiple routes to the same network. The route that was
created last wins. Of course, that means you cannot reach any link-local hosts
on the network that was attached first, but I guess that is OK. 
Comment 5 Bug Zapper 2008-04-03 20:37:26 EDT
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
Comment 6 Bug Zapper 2008-05-13 22:53:07 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 7 Lennart Poettering 2008-09-03 19:00:47 EDT
(In reply to comment #4)
> Linux is fine with multiple routes to the same network. The route that was
> created last wins. Of course, that means you cannot reach any link-local hosts
> on the network that was attached first, but I guess that is OK. 

I need to correct myself here. Linux doesn't allow multiple routes to the same destination with the same metric.

An elegant way to work around this is by adding the ifindex to the 1000. i.e. Something like this:

ip route add 169.254.0.0/16 dev eth0 metric $((1000 + `cat /sys/class/net/eth0/ifindex`)) scope link

The second route (i.e. the default one) only needs to be there if we have an IPv4ll address assigned. I can thus create it in the avahi-autoipd package, it doesn't need to be set globally.

Thus I only ask you to replace this line in the network scripts:

 ip route replace 169.254.0.0/16 dev ${REALDEVICE}

by this one:

  ip route add 169.254.0.0/16 dev ${REALDEVICE} metric $((1000 + `cat /sys/class/net/${REALDEVICE}/ifindex`)) scope link
Comment 9 Lennart Poettering 2008-09-04 11:14:49 EDT
The commit looks borked. You open three ((( but close only two )).
Comment 10 Bill Nottingham 2008-09-04 11:36:19 EDT
Fixed.

Note You need to log in before you can comment on or make changes to this bug.