Re: Page fault in ipfw?

From: Julian Elischer <julian_at_elischer.org>
Date: Tue, 09 Jan 2007 12:55:09 -0800
Sergey Zaharchenko wrote:
> Hello Rong-en!
> 
> Tue, Jan 09, 2007 at 10:07:16PM +0800 you wrote:
> 
>> On 1/9/07, Sergey Zaharchenko <doublef-ctm_at_yandex.ru> wrote:
>>> Hello -current,
>>>
>>> After updating from December to yesterday's CURRENT (to try catching the
>>> SMB recursive locking) I observe the following fault when I connect to
>>> the internet via PPP:
>>>
>> [...]
>>
>> Just curious, do you have any rule with 'log' keyword?
> 
> Well yes I do, and the logging seems to be it. I'm having problems with
> making a normal stack trace, but the fault itself occurs in ipfw_log()
> at /usr/src/sys/netinet/ip_fw2.c:928:
> 
> :                {
> :                        tcp = L3HDR(struct tcphdr, ip); <--- here
> :                        udp = L3HDR(struct udphdr, ip);

ok I THINK I see what is happening.
'ip' is now imported instead of being derived locally.
somewhere the value of ip is being set to NULL, assuming we are going to
generate it later.. ahhh here it is:

try this!

Index: ip_fw2.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/ip_fw2.c,v
retrieving revision 1.158
diff -u -r1.158 ip_fw2.c
--- ip_fw2.c    3 Jan 2007 11:12:54 -0000       1.158
+++ ip_fw2.c    9 Jan 2007 20:53:47 -0000
_at__at_ -903,8 +903,6 _at__at_
                 struct icmphdr *icmp;
                 struct tcphdr *tcp;
                 struct udphdr *udp;
-               /* Initialize to make compiler happy. */
-               struct ip *ip = NULL;
  #ifdef INET6
                 struct ip6_hdr *ip6 = NULL;
                 struct icmp6_hdr *icmp6;





> 
> I've tried setting net.inet.ip.fw.verbose=0 and everything seems ok. But
> I'd like to keep logging... 
> 
> Thank you,
> 
Received on Tue Jan 09 2007 - 20:07:19 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:04 UTC