lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1389889520.31367.403.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Thu, 16 Jan 2014 08:25:20 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Harry Mason <harry.mason@...othwall.net>
Cc:	Jamal Hadi Salim <hadi@...atatu.com>,
	linux-netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] sch_htb: let skb->priority refer to non-leaf class

On Thu, 2014-01-16 at 14:45 +0000, Harry Mason wrote:
> If the class in skb->priority is not a leaf, apply filters from the
> selected class, not the qdisc. This allows netfilter or user space
> to partially classify the packet and tc filters to finish it off.
> 
> Signed-off-by: Harry Mason <harry.mason@...othwall.net>
> ---
>  net/sched/sch_htb.c |    8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
> index 717b210..e50ab65 100644
> --- a/net/sched/sch_htb.c
> +++ b/net/sched/sch_htb.c
> @@ -223,7 +223,13 @@ static struct htb_class *htb_classify(struct
> sk_buff *skb, struct Qdisc *sch,
>         return cl;
> 
>     *qerr = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
> -   tcf = q->filter_list;
> +
> +   /* Start with inner filter chain if a non-leaf class is selected */
> +   if (cl)
> +       tcf = cl->filter_list;
> +   else
> +       tcf = q->filter_list;
> +

Interesting idea.

Could this break some existing htb setups ?

Also we test cl being NULL at line 222, it would be nice to not test it
again...



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ