On Tue, 15 Aug 2006, Bill Nottingham wrote: > 2.6.17-rc4+. > > Trivial example: > > # modprobe bonding (creates bond0) > # ip link set bond0 name "a b" > # echo "-a b" > /sys/class/net/bonding_masters > bonding: unable to delete non-existent bond a > bash: echo: write error: No such device >
Yuck. The problem here is the space in the interface name, which the sysfs code chokes on. The code just does sscanf(buffer, "%16s", command); /* IFNAMSIZ*/ and goes from there. Because of the space, it only gets the first half of the interface name. Suggestions? Do we just omit the sscanf and copy up to the newline (or EOF)? Should there be another delimiter here? Are spaces allowed in interface names anyway? I can't believe that bonding is the only area affected by this. -Mitch BTW this will also break if you try to add/remove a slave with a space in the name through sysfs. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html