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: <Pine.LNX.4.64.0803291812430.8589@wrl-59.cs.helsinki.fi>
Date:	Sat, 29 Mar 2008 18:13:47 +0200 (EET)
From:	"Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi>
To:	Jan Engelhardt <jengelh@...putergmbh.de>
cc:	Patrick Hardy <kaber@...sh.net>, netfilter-devel@...r.kernel.org,
	David Miller <davem@...emloft.net>,
	Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] [NETFILTER] xt_TCPMSS: combine nearly identical
 reverse_mtu4/6

On Sat, 29 Mar 2008, Jan Engelhardt wrote:

> How about this one instead?

A minor correction is necessary, see below.

> commit 1143bd2cbcddb9fcdbffea6a2edfde42dca5bb46
> Author: Jan Engelhardt <jengelh@...putergmbh.de>
> Date:   Sat Mar 29 16:20:13 2008 +0100
> 
>     [NETFILTER]: Collapse tcpmss_reverse_mtu{4,6} into one function
> 
>     Signed-off-by: Jan Engelhardt <jengelh@...putergmbh.de>
> ---
>  net/netfilter/xt_TCPMSS.c |   44 ++++++++++++++------------------------------
>  1 files changed, 14 insertions(+), 30 deletions(-)
> 
> diff --git a/net/netfilter/xt_TCPMSS.c b/net/netfilter/xt_TCPMSS.c
> index 217e2b6..2e3fe8e 100644
> --- a/net/netfilter/xt_TCPMSS.c
> +++ b/net/netfilter/xt_TCPMSS.c
> @@ -147,15 +147,19 @@ tcpmss_mangle_packet(struct sk_buff *skb,
>  	return TCPOLEN_MSS;
>  }
> 
> -static u_int32_t tcpmss_reverse_mtu4(const struct iphdr *iph)
> +static u_int32_t tcpmss_reverse_mtu(const struct sk_buff *skb,
> +                                    unsigned int family)
>  {
> -	struct flowi fl = {
> -		.fl4_dst = iph->saddr,
> -	};
> +	struct flowi fl = {};
>  	const struct nf_afinfo *ai;
>  	struct rtable *rt = NULL;
>  	u_int32_t mtu     = ~0U;
> 
> +	if (family == AF_INET)
> +		fl.fl4_dst = ip_hdr(skb)->saddr;
> +	else
> +		fl.fl6_dst = ipv6_hdr(skb)->saddr;
> +
>  	rcu_read_lock();
>  	ai = nf_get_afinfo(AF_INET);

s/AF_INET/family/



-- 
 i.
--
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