Darren Reed wrote:
> Corey Johnston wrote:
>> Yeah, I'm having problems with that line too.
>> Looks safe to me to change ISL_UNLOAD to 0.
> 
> 
> For some reason ip_state.h must have escaped being in the diff.
> 
> Using 0 will work better for you than what the actual one would :)
> 
> Darren
> 

There's a problem with the patch - I've patched and rebuilt a test
system before trying it on my live one, unfortunately:

   ipfstat -sl

now dumps core:

# cd /usr/src/ipfilter/ip_fil4.1.13_with_QM_patches_plus_Darrens_orph.patch
# gdb BSD/FreeBSD-5.4-RELEASE-p22-i386/ipfstat /root/ipfstat.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...
Core was generated by `ipfstat'.
Program terminated with signal 10, Bus error.
Reading symbols from /lib/libncurses.so.5...done.
Loaded symbols for /lib/libncurses.so.5
Reading symbols from /lib/libkvm.so.2...done.
Loaded symbols for /lib/libkvm.so.2
Reading symbols from /lib/libc.so.5...done.
Loaded symbols for /lib/libc.so.5
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  printstate (sp=0xc379c000, opts=262176, now=443)
    at ../../lib/printstate.c:24
24             if (sp->is_phnext == NULL)
(gdb) bt
#0  printstate (sp=0xc379c000, opts=262176, now=443)
    at ../../lib/printstate.c:24
#1  0x0804abb4 in showipstates (ipsp=0xbfbfeafc) at
../../tools/ipfstat.c:983
#2  0x08049b26 in main (argc=2, argv=0xbfbfeaf4) at
../../tools/ipfstat.c:376
(gdb) frame 0
#0  printstate (sp=0xc379c000, opts=262176, now=443)
    at ../../lib/printstate.c:24
24             if (sp->is_phnext == NULL)
(gdb) print sp
$1 = (ipstate_t *) 0xc379c000
(gdb) print *sp
Cannot access memory at address 0xc379c000
(gdb) list
19              synclist_t ipsync;
20
21              if (kmemcpy((char *)&ips, (u_long)sp, sizeof(ips)))
22                      return NULL;
23
24             if (sp->is_phnext == NULL)
25                     PRINTF("ORPHAN ");
26              PRINTF("%s -> ", hostname(ips.is_v, &ips.is_src.in4));
27              PRINTF("%s pass %#x pr %d state %d/%d bkt %d\n",
28                      hostname(ips.is_v, &ips.is_dst.in4),
ips.is_pass, ips.is_p,
(gdb) frame 1
#1  0x0804abb4 in showipstates (ipsp=0xbfbfeafc) at
../../tools/ipfstat.c:983
983                     ipsp->iss_list = printstate(ipsp->iss_list, opts,
(gdb) print ipsp
$2 = (ips_stat_t *) 0xbfbfeafc
(gdb) print *ipsp
$3 = {iss_hits = 619, iss_miss = 221, iss_max = 0, iss_maxref = 0,
  iss_tcp = 0, iss_udp = 1, iss_icmp = 0, iss_nomem = 0, iss_expire = 0,
  iss_fin = 0, iss_active = 1, iss_logged = 0, iss_logfail = 1,
iss_inuse = 1,
  iss_wild = 0, iss_killed = 0, iss_ticks = 443, iss_bucketfull = 0,
  iss_statesize = 399979, iss_statemax = 279883, iss_table = 0xc3b05000,
  iss_list = 0xc379c000, iss_bucketlen = 0xc4189000}
(gdb) print ipsp->iss_list
$4 = (ipstate_t *) 0xc379c000
(gdb)

Let me know if I can provide any more info - I can let you have the core
file etc it would help.

Simon

-- 
----------------------------------------------------------------------
Dr Simon A. Boggis                              Senior Network Analyst
Computing Services,                                 Tel. 020 7882 7078
Queen Mary, University of London, London E1 4NS UK.

Reply via email to