diff options
Diffstat (limited to 'net/l2tp/l2tp_ip.c')
-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 b56be1452f8e..585d93ecee2d 100644 --- a/net/l2tp/l2tp_ip.c +++ b/net/l2tp/l2tp_ip.c | |||
@@ -271,7 +271,8 @@ static int l2tp_ip_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len) | |||
271 | chk_addr_ret != RTN_MULTICAST && chk_addr_ret != RTN_BROADCAST) | 271 | chk_addr_ret != RTN_MULTICAST && chk_addr_ret != RTN_BROADCAST) |
272 | goto out; | 272 | goto out; |
273 | 273 | ||
274 | inet->inet_rcv_saddr = inet->inet_saddr = addr->l2tp_addr.s_addr; | 274 | if (addr->l2tp_addr.s_addr) |
275 | inet->inet_rcv_saddr = inet->inet_saddr = addr->l2tp_addr.s_addr; | ||
275 | if (chk_addr_ret == RTN_MULTICAST || chk_addr_ret == RTN_BROADCAST) | 276 | if (chk_addr_ret == RTN_MULTICAST || chk_addr_ret == RTN_BROADCAST) |
276 | inet->inet_saddr = 0; /* Use device */ | 277 | inet->inet_saddr = 0; /* Use device */ |
277 | sk_dst_reset(sk); | 278 | sk_dst_reset(sk); |