[pve-devel] r5327 - qemu-server/trunk

svn-commits at proxmox.com svn-commits at proxmox.com
Fri Dec 3 14:08:02 CET 2010


Author: dietmar
Date: 2010-12-03 14:08:02 +0100 (Fri, 03 Dec 2010)
New Revision: 5327

Modified:
   qemu-server/trunk/ChangeLog
   qemu-server/trunk/Makefile
   qemu-server/trunk/QemuServer.pm
   qemu-server/trunk/bridge-vlan
   qemu-server/trunk/changelog.Debian
Log:


Modified: qemu-server/trunk/ChangeLog
===================================================================
--- qemu-server/trunk/ChangeLog	2010-12-03 05:20:28 UTC (rev 5326)
+++ qemu-server/trunk/ChangeLog	2010-12-03 13:08:02 UTC (rev 5327)
@@ -1,3 +1,7 @@
+2010-12-03  Proxmox Support Team  <support at proxmox.com>
+
+	* QemuServer.pm (config_to_command): die if ifname > 15
+
 2010-10-28  Seth Lauzon <seth.lauzon at gmail.com>
 
 	* qmrestore (restore_qemu): new option --repeat (repeat the restoration

Modified: qemu-server/trunk/Makefile
===================================================================
--- qemu-server/trunk/Makefile	2010-12-03 05:20:28 UTC (rev 5326)
+++ qemu-server/trunk/Makefile	2010-12-03 13:08:02 UTC (rev 5327)
@@ -2,7 +2,7 @@
 
 VERSION=1.1
 PACKAGE=qemu-server
-PKGREL=25
+PKGREL=26
 
 DESTDIR=
 PREFIX=/usr

Modified: qemu-server/trunk/QemuServer.pm
===================================================================
--- qemu-server/trunk/QemuServer.pm	2010-12-03 05:20:28 UTC (rev 5326)
+++ qemu-server/trunk/QemuServer.pm	2010-12-03 13:08:02 UTC (rev 5327)
@@ -1407,7 +1407,7 @@
 
 	    $foundnet = 1;
 
-	    my $ifname = "vmtab${vmid}i$i";
+	    my $ifname = "vt${vmid}i$i";
 
 	    if ($vernum < 13000) {
 		push @$cmd, '-net', "tap,vlan=$i,ifname=$ifname,script=/var/lib/qemu-server/bridge-vlan";
@@ -1425,9 +1425,15 @@
 		if ($vernum < 13000) {
 		    push @$cmd, '-net', "nic,vlan=$i,model=$nic->{model},macaddr=$nic->{macaddr}";
 		} else {
-		    push @$cmd, '-netdev', "type=tap,id=${k}d$j,ifname=${ifname}d$j,script=/var/lib/qemu-server/bridge-vlan$vhostparam";
+		    $ifname = "${ifname}d$j";
+		    push @$cmd, '-netdev', "type=tap,id=${k}d$j,ifname=${ifname},script=/var/lib/qemu-server/bridge-vlan$vhostparam";
 		    push @$cmd, '-device', "$device,mac=$nic->{macaddr},netdev=${k}d$j";
 		}
+
+		# kvm uses TUNSETIFF ioctl, and that limits ifname length
+		die "interface name '$ifname' is too long (max 15 character)\n" 
+		    if length($ifname) >= 16;
+
 		$j = $j + 1;
 	    }
 

Modified: qemu-server/trunk/bridge-vlan
===================================================================
--- qemu-server/trunk/bridge-vlan	2010-12-03 05:20:28 UTC (rev 5326)
+++ qemu-server/trunk/bridge-vlan	2010-12-03 13:08:02 UTC (rev 5327)
@@ -7,7 +7,7 @@
 die "no interface specified\n" if !$iface;
 
 die "got strange interface name '$iface'\n" 
-    if $iface !~ m/^vmtab(\d+)i(\d+)(d\d+)?$/;
+    if $iface !~ m/^vt(\d+)i(\d+)(d\d+)?$/;
 
 my $vmid = $1;
 my $vlan = $2;

Modified: qemu-server/trunk/changelog.Debian
===================================================================
--- qemu-server/trunk/changelog.Debian	2010-12-03 05:20:28 UTC (rev 5326)
+++ qemu-server/trunk/changelog.Debian	2010-12-03 13:08:02 UTC (rev 5327)
@@ -1,3 +1,10 @@
+qemu-server (1.1-26) unstable; urgency=low
+
+  * change tab device nameing from "vmtab${vmid}..." to "vt${vmid}...",
+  that is 3 letters shorter (tab interface names are limited to 15 characters)
+
+ -- Proxmox Support Team <support at proxmox.com>  Fri, 03 Dec 2010 14:02:30 +0100
+
 qemu-server (1.1-25) unstable; urgency=low
 
   * new --repeat option for qmrestore




More information about the pve-devel mailing list