Hello, I have a problem with brctl with my embedded device. Everytime I try to create a bridge, I get the following: # brctl addbr br0 brctl: bridge br0: Invalid argument On linux, the bridge is created as a module and loaded at startup (with modprobe -v bridge I get no errors and with lsmod the bridge is listed). Does anybody has every tried brctl with linux 2.4 ? I know there were compile errors with older busybox version and I was wondering if only compile issues have been fixed or also functional problem. Thank you for your support. Thierry Matalini My system: Linux kernel 2.4.20 (Montavista Pro 3.1) BusyBox v1.17.2 PowerPC Linux plattform (MPC 8247, PowerQuiccII)
I confirm that brctl is not working with linux 2.4 The linux 2.4 uses IOCTL in a different way when creating bridge or adding interfacs. The IOCTL defines at the beginning of brctl.c file need to be removed and the following code must be updated: ------- #ifdef SIOCBRADDBR || SIOCBRDELBR ioctl_or_perror_and_die(fd, key == ARG_addbr ? SIOCBRADDBR : SIOCBRDELBR, br, "bridge %s", br); #else arm_ioctl(args, key == ARG_addbr ? BRCTL_ADD_BRIDGE : BRCTL_DEL_BRIDGE, (unsigned long) br, 0); ioctl_or_perror_and_die(fd, SIOCGIFBR, &args, "bridge %s", br); #endif ------- ------- #ifdef SIOCBRADDIF || SIOCBRDELIF ioctl_or_perror_and_die(fd, key == ARG_addif ? SIOCBRADDIF : SIOCBRDELIF, &ifr, "bridge %s", br); #else arm_ioctl(args, key == ARG_addif ? BRCTL_ADD_IF : BRCTL_DEL_IF, ifr.ifr_ifindex, 0); ifr.ifr_data = (char *)args; xioctl(fd, SIOCDEVPRIVATE, &ifr); #endif ------- Please feel free to contact me if you need more info. Regs, Thierry