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: <20130105190508.GE4031@order.stressinduktion.org>
Date:	Sat, 5 Jan 2013 20:05:08 +0100
From:	Hannes Frederic Sowa <hannes@...essinduktion.org>
To:	Stephen Hemminger <shemminger@...tta.com>
Cc:	netdev@...r.kernel.org, eric.dumazet@...il.com, davem@...emloft.net
Subject: Re: [PATCH] tcp: make sysctl_tcp_ecn namespace aware

On Sat, Jan 05, 2013 at 11:00:05AM -0800, Stephen Hemminger wrote:
> Rather than passing sysctl_tcp_ecn around as a parameter, I think it
> would be clearer and more efficient to make the ECN functions namespace
> aware.
> 
> Instead of:
> > @@ -728,7 +728,8 @@ struct tcp_skb_cb {
> >   * notifications, we disable TCP ECN negociation.
> >   */
> >  static inline void
> > -TCP_ECN_create_request(struct request_sock *req, const struct sk_buff *skb)
> > +TCP_ECN_create_request(struct request_sock *req, const struct sk_buff *skb,
> > +		int sysctl_tcp_ecn)
> >  {
> >  	const struct tcphdr *th = tcp_hdr(skb);
> >  
> 
> @@ -731,8 +730,9 @@ static inline void
>  TCP_ECN_create_request(struct request_sock *req, const struct sk_buff *skb)
>  {
>         const struct tcphdr *th = tcp_hdr(skb);
> -
> -       if (sysctl_tcp_ecn && th->ece && th->cwr &&
> +       
> +       if (sock_net(req->sk)->ipv4.sysctl_tcp_ecn && 
> +           th->ece && th->cwr &&
>             INET_ECN_is_not_ect(TCP_SKB_CB(skb)->ip_dsfield))
>                 inet_rsk(req)->ecn_ok = 1;

Having a quick look, I think req->sk is not initialized at that moment, but
I'll verify later.

Thanks!

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