Patchwork [net-next-2.6] : tcpv6: fix error with CONFIG_TCP_MD5SIG disabled

login
register
mail settings
Submitter Guo-Fu Tseng
Date Oct. 10, 2008, 3:21 a.m.
Message ID <20081010031703.M9440@cooldavid.org>
Download mbox | patch
Permalink /patch/3679/
State Accepted
Delegated to: David Miller
Headers show

Comments

Guo-Fu Tseng - Oct. 10, 2008, 3:21 a.m.
Hi David:

    This patch fix error with CONFIG_TCP_MD5SIG disabled.

    The patch is also available at:
    http://cooldavid.org/download/tcpv6.net-next-2.6.20081010.patch

    Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>

 		return;
@@ -1049,8 +1047,6 @@ static void tcp_v6_send_reset(struct sock *sk, struct
sk_buff *skb)
 #ifdef CONFIG_TCP_MD5SIG
 	if (sk)
 		key = tcp_v6_md5_do_lookup(sk, &ipv6_hdr(skb)->daddr);
-	else
-		key = NULL;
 #endif
 
 	if (th->ack)

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Oct. 10, 2008, 4:12 a.m.
From: "Guo-Fu Tseng" <cooldavid@cooldavid.org>
Date: Fri, 10 Oct 2008 11:21:15 +0800

> Hi David:
> 
>     This patch fix error with CONFIG_TCP_MD5SIG disabled.
> 
>     The patch is also available at:
>     http://cooldavid.org/download/tcpv6.net-next-2.6.20081010.patch
> 
>     Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>

Applied but I had to fix the corruption your email client made to
the patch.

I know you provide the patch via URL here, but that is totally
inconvenient for me and I will not go to a web site to get a
patch when it should be conveniently available directly in my
inbox.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ilpo Järvinen - Oct. 10, 2008, 12:05 p.m.
On Fri, 10 Oct 2008, Guo-Fu Tseng wrote:

>     This patch fix error with CONFIG_TCP_MD5SIG disabled.

Thanks for the fix, I realized (just before falling a sleep) that this 
would happen after my changes...
Guo-Fu Tseng - Oct. 10, 2008, 5:06 p.m.
On Thu, 09 Oct 2008 21:12:46 -0700 (PDT), David Miller wrote
> From: "Guo-Fu Tseng" <cooldavid@cooldavid.org>
> Date: Fri, 10 Oct 2008 11:21:15 +0800
> 
> 
> Applied but I had to fix the corruption your email client made to
> the patch.
> 
> I know you provide the patch via URL here, but that is totally
> inconvenient for me and I will not go to a web site to get a
> patch when it should be conveniently available directly in my
> inbox.
> 
I noticed that too, I'll be more careful next time.
Sorry for the inconvenience.

Guo-Fu Tseng

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

Patch

diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 13c6514..e5310c9 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1036,9 +1036,7 @@  static void tcp_v6_send_reset(struct sock *sk, struct
sk_buff *skb)
 {
 	struct tcphdr *th = tcp_hdr(skb);
 	u32 seq = 0, ack_seq = 0;
-#ifdef CONFIG_TCP_MD5SIG
-	struct tcp_md5sig_key *key;
-#endif
+	struct tcp_md5sig_key *key = NULL;
 
 	if (th->rst)