Skip to contentSkip to conversation

OSF: fix 2.4 compilation.

PATCH Superseded Evgeniy Polyakov 2 participants 2 messages Nov 26, 2005 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 OSF: fix 2.4 compilation.

Bug found by Aleksey Barabanov <alekseybb mail.ru>. Thank you.

ipv4/netfilter/tmp/ipt_osf.c renamed from ipv4/netfilter/ipt_osf.c.orig +4 -4
@@ -183,11 +183,11 @@
 		_optp = optp = (char *)(tcp+1);
 		optsize = tcp->doff*4 - sizeof(struct tcphdr);
 
-		if (optsize > sizeof(opts))
+		if (optsize > MAX_IPOPTLEN)
 		{
-			log("%s: BUG: too big options size: optsize=%lu, max=%zu.\n",
-					__func__, optsize, sizeof(opts));
-			optsize = sizeof(opts);
+			log("%s: BUG: too big options size: optsize=%lu, max=%u.\n",
+					__func__, optsize, MAX_IPOPTLEN);
+			optsize = MAX_IPOPTLEN;
 		}
 	}
 
Signature · 1 line
	Evgeniy Polyakov
#1 lore raw

ipv4/netfilter/tmp/ipt_osf.c

Quoted 7 lines · Evgeniy Polyakov

Bug found by Aleksey Barabanov <alekseybb mail.ru>. Thank you.

ipv4/netfilter/tmp/ipt_osf.c renamed from ipv4/netfilter/ipt_osf.c.orig +0 -0

This doesn't apply, I had to fix it up by hand. Please make sure future patches are based in the patch-o-matic root and patch the right file.