X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fipv4%2Fnetfilter%2Fipt_LOG.c;h=b79962e225f74048029fd5759b24e745c8164f39;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=0f1b881da992ce1259455ef4e615f2c2b068c11a;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/net/ipv4/netfilter/ipt_LOG.c b/net/ipv4/netfilter/ipt_LOG.c index 0f1b881da..b79962e22 100644 --- a/net/ipv4/netfilter/ipt_LOG.c +++ b/net/ipv4/netfilter/ipt_LOG.c @@ -76,7 +76,7 @@ static void dump_packet(const struct ipt_log_info *info, printk("FRAG:%u ", ntohs(iph.frag_off) & IP_OFFSET); if ((info->logflags & IPT_LOG_IPOPT) - && iph.ihl * 4 != sizeof(struct iphdr)) { + && iph.ihl * 4 > sizeof(struct iphdr)) { unsigned char opt[4 * 15 - sizeof(struct iphdr)]; unsigned int i, optsize; @@ -143,7 +143,7 @@ static void dump_packet(const struct ipt_log_info *info, 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)) { unsigned char opt[4 * 15 - sizeof(struct tcphdr)]; unsigned int i, optsize;