[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] dots should be valid characters in interface names



Howdy!

I spent some time scratching my head this evening, as libvirt was stripping the target/@dev entry from my interface[ type='ethernet'].

Turns out that this was caused by the interface name containing a period, which is rejected by isValidIfname(). As the kernel allows the creation of such interfaces, it is improper for libvirt to reject them.

The attached one-liner (built against RHEL6b1's libvirt but still applicable against current master as of 10c681622) fixes this issue.
--- libvirt-0.8.1/src/conf/domain_conf.h.orig	2010-05-19 21:30:45.938288123 -0500
+++ libvirt-0.8.1/src/conf/domain_conf.h	2010-05-19 21:31:54.823074637 -0500
@@ -299,7 +299,7 @@
 };
 
 # define VALID_IFNAME_CHARS \
- "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_/"
+ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_/."
 
 enum virDomainChrTargetType {
     VIR_DOMAIN_CHR_TARGET_TYPE_NULL = 0,

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]