Patchwork dccp: fix error propagation in dccp_v4_connect

login
register
mail settings
Submitter roy.qing.li@gmail.com
Date Nov. 21, 2011, 5:18 a.m.
Message ID <1321852700-2966-1-git-send-email-roy.qing.li@gmail.com>
Download mbox | patch
Permalink /patch/126687/
State Accepted
Delegated to: David Miller
Headers show

Comments

roy.qing.li@gmail.com - Nov. 21, 2011, 5:18 a.m.
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(-)
David Miller - Nov. 21, 2011, 9:45 p.m.
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

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