Skip to contentSkip to conversation

let submitted/61_nulldev_alignment match official kernel 2.4.25 in pom-20040409

PATCH New Friedrich Lobenstock 1 participant 1 message Apr 11, 2004 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 let submitted/61_nulldev_alignment match official kernel 2.4.25 in pom-20040409

Hi!

Tommi I have you CC'd as you are the author of this patch.

Here is a patch for the submitted/61_nulldev_alignment patch in pom-20040409 (not pom-ng!) that matches the latest official changes in kernel 2.4.25.

Signature · 2 lines
MfG / Regards
Friedrich Lobenstock
submitted/61_nulldev_alignment.patch renamed from submitted/61_nulldev_alignment.patch.pre-2.4.25 +4 -9
@@ -1,16 +1,11 @@
---- linux-2.4.orig/net/ipv4/netfilter/ip_tables.c	2003-12-26 19:24:46.000000000
-+0200
-+++ linux-2.4/net/ipv4/netfilter/ip_tables.c	2003-12-26 18:58:30.000000000 +0200
-@@ -260,7 +278,11 @@ ipt_do_table(struct sk_buff **pskb,
+--- linux-2.4.24/net/ipv4/netfilter/ip_tables.c	2003-08-25 04:44:44.000000000 -0700
++++ linux-2.4.25/net/ipv4/netfilter/ip_tables.c	2004-02-18 05:36:32.000000000 -0800
+@@ -259,7 +259,7 @@
  	     struct ipt_table *table,
  	     void *userdata)
  {
 -	static const char nulldevname[IFNAMSIZ] = { 0 };
-+	/* Pointer to nulldevname may be dereferenced as unsigned
-+	   long* in ip_packet_match. We need to guarantee
-+	   sufficient alignment here. */
-+	static const char nulldevname[IFNAMSIZ]
-+		__attribute__((__aligned__(__alignof__ (unsigned long)))) = {0};
++	static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long)))) = { 0 };
  	u_int16_t offset;
  	struct iphdr *ip;
  	void *protohdr;