[pso] [tema5][lin] problema hook

Adriana Draghici adriana008 at gmail.com
Thu Jun 4 17:43:32 EEST 2009


Salut,

Am urmatoarea problema: am hook-ul pt IN, si am pus un printk chiar la
inceputul lui si am observat ca nu intra vreodata in el.
Pe masina gazda imi apar toate testele passed, iar in masina virtuala imi
pica doar doua teste cu nr of rules,
cauzate de faptul ca nu se executa codul pus de mine in handler-ul pt IN.

Ce am facut pana acum referitor la acest hook:

static struct nf_hook_ops my_nfho_in = {
    .owner       = THIS_MODULE,
    .hook        = nf_hookfn_in,
    .hooknum     = NF_INET_LOCAL_IN,
    .pf          = PF_INET,
    .priority    = NF_IP_PRI_FIRST
};

In init :
err  = nf_register_hook (&my_nfho_in);    //register hook
    if (err != 0)
        goto out1;
In cleanup:
nf_unregister_hook (&my_nfho_in);

Hook-ul pt out este similiar si in handler-ul lui se intra.

Atunci cand vreau sa scot modulul imi da oops legat de nf_unregister_hook.

E ceva ce am uitat sau fac gresit?

Adriana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/pso/attachments/20090604/c4031056/attachment.htm>


More information about the pso mailing list