On 05/19/2010 10:05 PM, Laine Stump wrote:
On 05/19/2010 10:41 PM, Charles Duffy wrote:
> The attached one-liner (built against RHEL6b1's libvirt but still
> applicable against current master as of 10c681622) fixes this issue.
I think we need to add ":" there as well (at least - maybe there are
others), don't we?
In dev_valid_name() in net/core/dev.c, the following restrictions are
enforced as of 2.6.27:
- Empty strings are disallowed
- Length must not meet or exceed 16 (IFNAMSIZ)
- '.' and '..' are each invalid as freestanding names (but accepted as
part of a longer string)
- whitespace and '/' characters are prohibited at any point in the string
...and those are the only limitations in play.
Frankly, I'm a bit surprised colons are allowed -- my intuition was that
they would be permitted only for named IPs rather than devices -- but
such is the logic given here, and a bit of experimentation shows that
the kernel accepts them (though they trigger bugs in iproute2, which
appears in at least one place to make the same assumption I did; fun!)
A revised patch is attached. This lifts its logic from its kernel
counterpart, and is updated only to permit forward slashes (which, while
disallowed for interface names with the kernel, are required for
*device* names -- for which the ESX driver happens to overload this
field. Ugh).