lkml.org 
[lkml]   [2007]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 18/29] netfilter: notify about NF_QUEUE vs emergency skbs
    Emergency skbs should never touch user-space, however NF_QUEUE is fully user
    configurable. Notify the user of his mistake and try to continue.

    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    ---
    net/netfilter/core.c | 5 +++++
    1 file changed, 5 insertions(+)

    Index: linux-2.6-git/net/netfilter/core.c
    ===================================================================
    --- linux-2.6-git.orig/net/netfilter/core.c 2007-02-14 12:09:07.000000000 +0100
    +++ linux-2.6-git/net/netfilter/core.c 2007-02-14 12:09:18.000000000 +0100
    @@ -187,6 +187,11 @@ next_hook:
    kfree_skb(*pskb);
    ret = -EPERM;
    } else if ((verdict & NF_VERDICT_MASK) == NF_QUEUE) {
    + if (unlikely((*pskb)->emergency)) {
    + printk(KERN_ERR "nf_hook: NF_QUEUE encountered for "
    + "emergency skb - skipping rule.\n");
    + goto next_hook;
    + }
    NFDEBUG("nf_hook: Verdict = QUEUE.\n");
    if (!nf_queue(*pskb, elem, pf, hook, indev, outdev, okfn,
    verdict >> NF_VERDICT_BITS))
    --

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-02-21 16:35    [W:4.136 / U:0.140 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site