From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <031221c82df58582b268f97ad23e5b9a.axp-list@archive.invalid> X-Archive-Original-Message-ID: <3.0.1.32.19970409174902.006bbe94@ellpspace.math.ualberta.ca> Date: Wed, 9 Apr 1997 20:41:08 -0400 (EDT) From: Alvin Starr Subject: Firewall bug in 2.0.27 kernel Just gotta love C for its ability to do address calculations in "ip_fw.c" you will find int ip_fw_chk(struct iphdr *ip, struct device *rif, __u16 *redirport, struct ip_fw *chain, int policy, int mode) { struct ip_fw *f; struct tcphdr *tcp=(struct tcphdr *)((unsigned long *)ip+ip->ihl); struct udphdr *udp=(struct udphdr *)((unsigned long *)ip+ip->ihl); struct icmphdr *icmp=(struct icmphdr *)((unsigned long *)ip+ip->ihl); The problem is that the address calculation multiplies the ihl value by 8 due to the fact that it points to an "unsigned long". This calculation should be infact ((char *)ip)+(ip->ihl<<2) If somebody wants to tell me where to send the patch I will generate a patch against 2.0.27 and e-mail it out. Alvin Starr || voice: (416)493-3325 Interlink Connectivity || fax: (416)493-7974 alvin@iplink.net || -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com