[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] fix invalid frontend path for set_mtu
Hi, The set_mtu() function of xen-network-common.sh currently has this code: if [ ${type_if} = vif ] then local dev_=${dev#vif} local domid=${dev_%.*} local devid=${dev_#*.} local FRONTEND_PATH="/local/domain/$domid/device/vif/$devid" xenstore_write "$FRONTEND_PATH/mtu" ${mtu} fi This works fine if the device has its default name but if the xen config defines the vifname parameter the FRONTEND_PATH is incorrectly constructed. Learn the frontend path by reading the appropriate value from the backend. diff --git a/tools/hotplug/Linux/xen-network-common.sh b/tools/hotplug/Linux/xen-network-common.sh index 02e2388600..cd98f0d486 100644 --- a/tools/hotplug/Linux/xen-network-common.sh +++ b/tools/hotplug/Linux/xen-network-common.sh @@ -163,11 +163,7 @@ set_mtu () { if [ ${type_if} = vif ] then - local dev_=${dev#vif} - local domid=${dev_%.*} - local devid=${dev_#*.} - - local FRONTEND_PATH="/local/domain/$domid/device/vif/$devid" + local FRONTEND_PATH=$(xenstore_read "$XENBUS_PATH/frontend") xenstore_write "$FRONTEND_PATH/mtu" ${mtu} fi Thanks, James
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |