diff options
-rw-r--r-- | net/l2tp/l2tp_ip.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c index 585d93ecee2d..6274f0be82b0 100644 --- a/net/l2tp/l2tp_ip.c +++ b/net/l2tp/l2tp_ip.c | |||
@@ -442,8 +442,9 @@ static int l2tp_ip_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *m | |||
442 | 442 | ||
443 | daddr = lip->l2tp_addr.s_addr; | 443 | daddr = lip->l2tp_addr.s_addr; |
444 | } else { | 444 | } else { |
445 | rc = -EDESTADDRREQ; | ||
445 | if (sk->sk_state != TCP_ESTABLISHED) | 446 | if (sk->sk_state != TCP_ESTABLISHED) |
446 | return -EDESTADDRREQ; | 447 | goto out; |
447 | 448 | ||
448 | daddr = inet->inet_daddr; | 449 | daddr = inet->inet_daddr; |
449 | connected = 1; | 450 | connected = 1; |