* [PATCH 2.4 8/8]: Fix IP/TCP option logging
@ 2005-03-04 12:18 Patrick McHardy
0 siblings, 0 replies; only message in thread
From: Patrick McHardy @ 2005-03-04 12:18 UTC (permalink / raw)
To: David S. Miller; +Cc: Netfilter Development Mailinglist
[-- Attachment #1: 08.diff --]
[-- Type: text/x-patch, Size: 1277 bytes --]
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2005/03/04 11:36:23+01:00 kaber@coreworks.de
# [NETFILTER]: Fix IP/TCP option logging
#
# Signed-off-by: Patrick McHardy <kaber@trash.net>
#
# net/ipv4/netfilter/ipt_LOG.c
# 2005/03/04 11:35:42+01:00 kaber@coreworks.de +4 -3
# [NETFILTER]: Fix IP/TCP option logging
#
# Signed-off-by: Patrick McHardy <kaber@trash.net>
#
diff -Nru a/net/ipv4/netfilter/ipt_LOG.c b/net/ipv4/netfilter/ipt_LOG.c
--- a/net/ipv4/netfilter/ipt_LOG.c 2005-03-04 11:37:01 +01:00
+++ b/net/ipv4/netfilter/ipt_LOG.c 2005-03-04 11:37:01 +01:00
@@ -67,8 +67,8 @@
printk("FRAG:%u ", ntohs(iph->frag_off) & IP_OFFSET);
if ((info->logflags & IPT_LOG_IPOPT)
- && iph->ihl * 4 != sizeof(struct iphdr)
- && iph->ihl * 4 >= datalen) {
+ && iph->ihl * 4 > sizeof(struct iphdr)
+ && iph->ihl * 4 <= len) {
unsigned int i;
/* Max length: 127 "OPT (" 15*4*2chars ") " */
@@ -126,7 +126,8 @@
printk("URGP=%u ", ntohs(tcph->urg_ptr));
if ((info->logflags & IPT_LOG_TCPOPT)
- && tcph->doff * 4 != sizeof(struct tcphdr)) {
+ && tcph->doff * 4 > sizeof(struct tcphdr)
+ && tcph->doff * 4 <= datalen) {
unsigned int i;
/* Max length: 127 "OPT (" 15*4*2chars ") " */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-03-04 12:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-04 12:18 [PATCH 2.4 8/8]: Fix IP/TCP option logging Patrick McHardy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.