Hello,
The brctl applet doesn't compile with kernels < 2.6.7 because the
ioctls were renamed in that version.
I need to work with an ancient kernel (2.4.18) because of some
vendor-supplied binary-only kernel module that only works in that
version.
Thanks again for making such a great tool!
So here is the patch against busybox-1.13.2:
--- ./brctl.c.org 2009-01-30 13:08:28.000000000 +0100
+++ brctl.c 2009-01-30 13:08:58.000000000 +0100
@@ -15,4 +15,5 @@
#include "libbb.h"
#include <linux/sockios.h>
+#include <linux/version.h>
#include <net/if.h>
@@ -184,5 +185,10 @@
if (key == ARG_addbr || key == ARG_delbr) { /* addbr or delbr */
ioctl_or_perror_and_die(fd,
- key == ARG_addbr ? SIOCBRADDBR
: SIOCBRDELBR,
+
+ #if LINUX_VERSION_CODE <
KERNEL_VERSION(2,6,7)
+ key == ARG_addbr ?
BRCTL_ADD_BRIDGE: BRCTL_DEL_BRIDGE,
+ #else
+ key == ARG_addbr ?
SIOCBRADDBR : SIOCBRDELBR,
+ #endif
br, "bridge %s", br);
goto done;
@@ -200,5 +206,10 @@
}
ioctl_or_perror_and_die(fd,
- key == ARG_addif ? SIOCBRADDIF
: SIOCBRDELIF,
+ #if LINUX_VERSION_CODE <
KERNEL_VERSION(2,6,7)
+ key == ARG_addbr ?
BRCTL_ADD_IF: BRCTL_DEL_IF,
+ #else
+ key == ARG_addif ?
SIOCBRADDIF : SIOCBRDELIF,
+ #endif
+
&ifr, "bridge %s", br);
goto done_next_argv;
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox