WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-bugs

[Xen-bugs] [Bug 950] New: network-bridge script does not cope with more

To: xen-bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-bugs] [Bug 950] New: network-bridge script does not cope with more than one default route
From: bugzilla-daemon@xxxxxxxxxxxxxxxxxxx
Date: Sat, 7 Apr 2007 00:20:26 -0700
Delivery-date: Sat, 07 Apr 2007 00:21:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-bugs-request@lists.xensource.com?subject=help>
List-id: Xen Bugzilla <xen-bugs.lists.xensource.com>
List-post: <mailto:xen-bugs@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-bugs>, <mailto:xen-bugs-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-bugs>, <mailto:xen-bugs-request@lists.xensource.com?subject=unsubscribe>
Reply-to: bugs@xxxxxxxxxxxxxxxxxx
Sender: xen-bugs-bounces@xxxxxxxxxxxxxxxxxxx
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=950

           Summary: network-bridge script does not cope with more than one
                    default route
           Product: Xen
           Version: 3.0.3
          Platform: x86-64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Tools
        AssignedTo: xen-bugs@xxxxxxxxxxxxxxxxxxx
        ReportedBy: yrvafhom@xxxxxxxxxxxxxx


Due to earlier experiments with networking stuff, I ended up with more than one
default route configured on my host machine.

    [root@leucine ~]# ip route list
    169.254.0.0/16 dev eth0  scope link 
    10.0.0.0/8 dev eth0  proto kernel  scope link  src 10.0.0.8 
    default via 10.0.0.1 dev eth0 
    default via 10.0.0.20 dev eth0  metric 1 

The network-bridge script uses the following code to determine the initial
interface number:

    vifnum=${vifnum:-$(ip route list | awk '/^default / { print $NF }' | sed
's/^[^0-9]*//')}
    vifnum=${vifnum:-0}
    bridge=${bridge:-xenbr${vifnum}}
    netdev=${netdev:-eth${vifnum}}
    antispoof=${antispoof:-no}

    pdev="p${netdev}"
    vdev="veth${vifnum}"
    vif0="vif0.${vifnum}"

The bug is in the first line of this section
    vifnum=${vifnum:-$(ip route list | awk '/^default / { print $NF }' | sed
's/^[^0-9]*//')}

If you have more than one default route listed, then
        ip route list | awk '/^default / { print $NF }'
will return more than one line

    [root@leucine ~]# ip route list | awk  '/^default / { print $NF }'
    eth0
    1

This means vifnum, pdev, vdev and vif0 all get corrupted values at the start of
the network-bridge script, effectively "0\n1", "peth0\n1" etc.

If this happens, the debug log contains a clue - the newline character is
output in the error message :

    Link veth0
    1 is missing.
    This may be because you have reached the limit of the number of interfaces
    ....

Quick fix - remove the second default route on the host system.
Long term - fix the script to detect more than one line, or change the error
message (nothing to do with limit on loopback addresses).


-- 
Configure bugmail: 
http://bugzilla.xensource.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

_______________________________________________
Xen-bugs mailing list
Xen-bugs@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-bugs

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-bugs] [Bug 950] New: network-bridge script does not cope with more than one default route, bugzilla-daemon <=