Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 118823 - xen vif-route script does not work with newer iproute2 utility
Summary: xen vif-route script does not work with newer iproute2 utility
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Chris Bainbridge (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-12 15:52 UTC by slynn@granite-mtn.net
Modified: 2006-01-13 05:04 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description slynn@granite-mtn.net 2006-01-12 15:52:06 UTC
Recent versions of iproute2 have changed the acceptable format of command line input.  For instance, in "older" versions of iproute2 the following commands worked:

  ip ad li
  ip r a 10.0.0/24 via 10.0.0.1

Recent versions however (in the last 6 months or so) do not allow this shorthand input notation.

In my iproute2-ss051007 the command:

    /sbin/ip r

returns

    Object "r" is unknown, try "ip help".

You must use a longer notation:

    /sbin/ip route

the /etc/xen/scripts/vif-route script for app-emulation/xen-3.0.0-r2 (as with earlier versions)  contains the old shorhand notation as in:

----snippet---
case "$command" in
    online)
        ifconfig ${vif} ${main_ip} netmask 255.255.255.255 up
        echo 1 >/proc/sys/net/ipv4/conf/${vif}/proxy_arp
        ipcmd='a'
        ;;
    offline)
        ifdown ${vif}
        ipcmd='d'
        ;;
esac

if [ "${ip}" ] ; then
    # If we've been given a list of IP addresses, then add routes from dom0 to
    # the guest using those addresses.
    for addr in ${ip} ; do
      ip r ${ipcmd} ${addr} dev ${vif} src ${main_ip}
    done
fi
----snippet----

As a consequence routed interfaces do not work.  Push this upstream?
Comment 1 Chris Bainbridge (RETIRED) gentoo-dev 2006-01-13 05:04:34 UTC
Reported upsteam http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=478