Skip to contentSkip to conversation

ebtables: make it be able to work on 64bit kernel with 32 bit userspace

PATCH Superseded [email protected] 1 participant 2 messages Nov 7, 2014 – Nov 12, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ebtables: make it be able to work on 64bit kernel with 32 bit userspace

From: "Roy.Li" <[email protected]>

KERNEL_64_USERSPACE_32 should be enabled for 64bit kernel with 32 bit userspace, otherwise, the date struct(struct ebt_replace, struct ebt_entry_match) have different alignment size, will make it unable to work.

---
 meta-networking/recipes-filter/ebtables/ebtables_2.0.10-4.bb | 10 ++++++++++
 1 file changed, 10 insertions(+)
meta-networking/recipes-filter/ebtables/ebtables_2.0.10-4.bb +10 -0
index 32cfc75..9b04d1b 100644
@@ -27,6 +27,16 @@ S = "${WORKDIR}/ebtables-v${PV}"
 
 inherit update-rc.d systemd
 
+python __anonymous () {
+    import re
+
+    multilib=d.getVar('MLPREFIX', True) or ""
+    searchstr = "lib.?32"
+    reg = re.compile(searchstr)
+    if reg.search(multilib):
+        d.appendVar('CFLAGS' ,' -DKERNEL_64_USERSPACE_32 -DEBT_MIN_ALIGN=8')
+}
+
 EXTRA_OEMAKE = " \
         BINDIR=${base_sbindir} \
         MANDIR=${mandir} \
Signature · 1 line
2.1.0
#1 lore raw

Please drop this, I have a refine patch for this issue.

-Roy

Quoted 34 lines · On 2014年11月07日 17:14, [email protected] wrote:

From: "Roy.Li" <[email protected]>

KERNEL_64_USERSPACE_32 should be enabled for 64bit kernel with 32 bit userspace, otherwise, the date struct(struct ebt_replace, struct ebt_entry_match) have different alignment size, will make it unable to work.

---
  meta-networking/recipes-filter/ebtables/ebtables_2.0.10-4.bb | 10 ++++++++++
  1 file changed, 10 insertions(+)
meta-networking/recipes-filter/ebtables/ebtables_2.0.10-4.bb +10 -0
index 32cfc75..9b04d1b 100644
@@ -27,6 +27,16 @@ S = "${WORKDIR}/ebtables-v${PV}"
 
  inherit update-rc.d systemd
 
+python __anonymous () {
+    import re
+
+    multilib=d.getVar('MLPREFIX', True) or ""
+    searchstr = "lib.?32"
+    reg = re.compile(searchstr)
+    if reg.search(multilib):
+        d.appendVar('CFLAGS' ,' -DKERNEL_64_USERSPACE_32 -DEBT_MIN_ALIGN=8')
+}
+
  EXTRA_OEMAKE = " \
          BINDIR=${base_sbindir} \
          MANDIR=${mandir} \
Signature · 2 lines
Best Reagrds,
Roy | RongQing Li