Commit 43d28c61 authored by Ulrich Weber's avatar Ulrich Weber Committed by David S. Miller

pptp: support sockets bound to an interface

use sk_bound_dev_if for route lookup as already done
in most of the other ip_route_output_ports() calls.

Since most PPPoA providers use 10.0.0.138 as default gateway IP
this will allow connections to multiple PPTP providers with the
same IP address over different interfaces.
Signed-off-by: default avatarUlrich Weber <ulrich.weber@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8fec380a
...@@ -155,7 +155,7 @@ static int pptp_xmit(struct ppp_channel *chan, struct sk_buff *skb) ...@@ -155,7 +155,7 @@ static int pptp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
opt->dst_addr.sin_addr.s_addr, opt->dst_addr.sin_addr.s_addr,
opt->src_addr.sin_addr.s_addr, opt->src_addr.sin_addr.s_addr,
0, 0, IPPROTO_GRE, 0, 0, IPPROTO_GRE,
RT_TOS(0), 0); RT_TOS(0), sk->sk_bound_dev_if);
if (IS_ERR(rt)) if (IS_ERR(rt))
goto tx_error; goto tx_error;
...@@ -444,7 +444,8 @@ static int pptp_connect(struct socket *sock, struct sockaddr *uservaddr, ...@@ -444,7 +444,8 @@ static int pptp_connect(struct socket *sock, struct sockaddr *uservaddr,
opt->dst_addr.sin_addr.s_addr, opt->dst_addr.sin_addr.s_addr,
opt->src_addr.sin_addr.s_addr, opt->src_addr.sin_addr.s_addr,
0, 0, 0, 0,
IPPROTO_GRE, RT_CONN_FLAGS(sk), 0); IPPROTO_GRE, RT_CONN_FLAGS(sk),
sk->sk_bound_dev_if);
if (IS_ERR(rt)) { if (IS_ERR(rt)) {
error = -EHOSTUNREACH; error = -EHOSTUNREACH;
goto end; goto end;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment