Skip to contentSkip to conversation

dccp: fix error propagation in dccp_v4_connect

PATCH Applied [email protected] 2 participants 2 messages Nov 21, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dccp: fix error propagation in dccp_v4_connect

From: RongQing.Li <[email protected]>

The errcode is not updated when ip_route_newports() fails.

---
 net/dccp/ipv4.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
net/dccp/ipv4.c +1 -0
index 90a919a..3f4e541 100644
@@ -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;
 	}
Signature · 1 line
1.7.1