Aiee :)

        Hello!

        I'm playing with the register_firewall kernel facilities
        and everything works fine, but I got some weirdness, even if
        I'm quite sure it's my fault.

        I registered the firewall using this firewall_ops{}

        struct firewall_ops dis_ops = {
                NULL,
                dis_dummy,
                dis_dummy,
                dis_output,
                1,
                AF_INET 
        };

        dis_dummy simple returns FW_SKIP (so I can use ipchains 
        [fw->priority == 0] according to call_*_firewall sources).

        dis_output after doing some basic checking, calls dis_dump.

        void
        dis_dump(struct *skb)
        {

                struct iphdr *ip = skb->nh.iph

                printk(KERN_INFO "dst %d.%d.%d.%d\n", \
               (ntohl(ip->daddr)>>24)&0xFF, \
               (ntohl(ip->daddr)>>16)&0xFF, \
               (ntohl(ip->daddr)>>8)&0xFF, \
               (ntohl(ip->daddr))&0xFF);
        printk(KERN_INFO "src %d.%d.%d.%d\n", \
               (ntohl(ip->saddr)>>24)&0xFF, \
               (ntohl(ip->saddr)>>16)&0xFF, \
               (ntohl(ip->saddr)>>8)&0xFF, \
               (ntohl(ip->saddr))&0xFF  );
        printk(KERN_INFO "skbuff dev %s\n", skb->dev->name);
                return;
        }

        Everything runs fine (and I got the right dumping into the kernel
        log), until I tried to ping flood (ping -f) an host, just
        to get more traffic.

        This is the Oops I got:

Apr 24 02:47:10 armageddon kernel: Unable to handle kernel NULL pointer dereference at 
virtual address 00000000
current->tss.cr3 = 021f4000, %cr3 = 021f4000
*pde = 00000000
Oops: 0000
CPU:    0
EIP:    0010:[<c301a0bf>]
EFLAGS: 00010286
eax: 00000000   ebx: c2660490   ecx: c01e9c06   edx: c2468000
esi: c1986c20   edi: c21b9e10   ebp: c21b9d98   esp: c21b9d84
ds: 0018   es: 0018   ss: 0018
Process ping (pid: 478, process nr: 30, stackpage=c21b9000)
Stack: 00000014 0000001a 00000018 c2660490 c1986c20 c21b9db0 c301a140 c1986c20
       c301a217 c301a2b8 00000002 00000000 c01469df c301a2b8 00000002 c27cccf4
       c2660490 00000000 c21b9e10 c2660490 00000054 c1f0da40 c1c2eca0 c0157a17
Call Trace: [<c301a140>] [<c301a217>] [<c301a2b8>] [<c01469df>] [<c301a2b8>] 
[<c0157a17>] [<c01630a1>]
       [<c0162dd0>] [<c016894f>] [<c01688c0>] [<c0145376>] [<c01688c0>] [<c0145eac>] 
[<c012d5aa>] [<c012d8f0>]
       [<c018d74b>] [<c0109a42>] [<c01466d3>] [<c010899c>]
Code: 8b 00 50 68 d9 a1 01 c3 e8 78 89 0f fd 8d 65 f8 5b 5e 89 ec
zsh: 478 segmentation fault  ping -f xxx.xxx.xxx.xxx

The module I'm using is registered @ (as /proc/ksyms said)

        [<c301a2b8>]    Where sits dis_ops (firewall_ops{})


        Could anyone point me out on the right way plz ? Thx
        

bye bye

                                -- gg sullivan


-- 
Lorenzo Cavallaro       `Gigi Sullivan' <[EMAIL PROTECTED]>

Until I loved, life had no beauty;
I did not know I lived until I had loved. (Theodor Korner)
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to