Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 118823

Summary: xen vif-route script does not work with newer iproute2 utility
Product: Gentoo Linux Reporter: slynn <slynn>
Component: New packagesAssignee: Chris Bainbridge (RETIRED) <chrb>
Status: RESOLVED UPSTREAM    
Severity: normal    
Priority: High    
Version: 2005.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

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