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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <201204231433.17751.hans.schillstrom@ericsson.com>
Date:	Mon, 23 Apr 2012 14:33:16 +0200
From:	Hans Schillstrom <hans.schillstrom@...csson.com>
To:	Pablo Neira Ayuso <pablo@...filter.org>
CC:	"kaber@...sh.net" <kaber@...sh.net>,
	"jengelh@...ozas.de" <jengelh@...ozas.de>,
	"netfilter-devel@...r.kernel.org" <netfilter-devel@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"hans@...illstrom.com" <hans@...illstrom.com>
Subject: Re: [v11 PATCH 2/3] NETFILTER module xt_hmark, new target for HASH based fwmark

On Thursday 12 April 2012 17:54:42 Pablo Neira Ayuso wrote:
> Hi Hans,
> 
> On Thu, Mar 22, 2012 at 12:59:52PM +0100, Hans Schillstrom wrote:
[snip]

> >
> > +config NETFILTER_XT_TARGET_HMARK
> > +     tristate '"HMARK" target support'
> > +     depends on (IP6_NF_IPTABLES || IP6_NF_IPTABLES=n)
> 
> do we really need this dependency above?

Nope, I'll removed it.

[snip] 
> 
> There's an inconsistency here. No conntrack support for IPv6.

That's true, since it was intended for nat from the very begining..
I'll added.

> 
> I'd suggest to split hmark_v4 into two functions by checking:
> 
or make a common  hmark_ct for ipv6 and ipv4

> ... hmark_v4(...)
> {
>         if (info->flags & XT_F_HMARK_CT)
>                 ret = hmark_tg_ct_v4(...)
>         else
>                 ret = hmark_tg_v4(...)
> 
>         return ret;
> }
> 
> Same thing for IPv6. Those function will look smaller, and that's good
> to make the code more maintainable.
> 
> You can define some hmark_hash_v4 and hmark_hash_v6 function that you
> may want to inline.
> 
> Another suggestion in case you may need to extend HMARK in
> the future. I think some info->type field to specify the
> 
> info->type can be HMARK_T_PKT or HMARK_T_CT.
> 
> Thus, the code above would look like:
> 
> ... hmark_v4(...)
> {
>         switch(info->type) {
>         case HMARK_T_PKT:
>                 ret = hmark_tg_ct_v4(...)
>                 break;
>         case HMARK_T_CT:
>                 ret = hmark_tg_v4(...)
>                 break;
>         }
> }
> 
> But *this is only a suggestion*, of course.
> 
Thanks Pablo for your review , I will send a new patch today

Regards
Hans Schillstrom <hans.schillstrom@...csson.com>
--
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