diff mbox

dccp: fix error propagation in dccp_v4_connect

Message ID 1321852700-2966-1-git-send-email-roy.qing.li@gmail.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Li RongQing Nov. 21, 2011, 5:18 a.m. UTC
From: RongQing.Li <roy.qing.li@gmail.com>

The errcode is not updated when ip_route_newports() fails.

Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
---
 net/dccp/ipv4.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

David Miller Nov. 21, 2011, 9:45 p.m. UTC | #1
From: roy.qing.li@gmail.com
Date: Mon, 21 Nov 2011 13:18:20 +0800

> From: RongQing.Li <roy.qing.li@gmail.com>
> 
> The errcode is not updated when ip_route_newports() fails.
> 
> Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>

Applied, thank you.
--
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
diff mbox

Patch

diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 90a919a..3f4e541 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -111,6 +111,7 @@  int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
 	rt = ip_route_newports(fl4, rt, orig_sport, orig_dport,
 			       inet->inet_sport, inet->inet_dport, sk);
 	if (IS_ERR(rt)) {
+		err = PTR_ERR(rt);
 		rt = NULL;
 		goto failure;
 	}