Netfilter in IPv4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

Can any of you help me check if below piece of code is correct? And it does not violate any Linux conventions? 

static unsigned int hook_input(
 unsigned int hooknum,
    struct sk_buff **pskb,
    const struct net_device *in,
    const struct net_device *out,
    int (*okfn)(struct sk_buff *))
{
 
    ......................... 

    If(action == APPLY )
     {
            skb->dst->input(skb);
            result = NF_STOLEN;
     }

    ......................
}

This is a netfilter handler registered to NF_IP_LOCAL_IN. Because we need process the processed packet again, we use skb->dst->input(skb) to send it again, then it will be processed again by the callback. Is this correct?

Thanks, Xia Weizhong
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux