aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pptp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-02 17:31:35 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-02 17:31:35 -0500
commitb23dd4fe42b455af5c6e20966b7d6959fa8352ea (patch)
treebf97323eae9a8d084170e573ff2c0c40bc72c3cd /drivers/net/pptp.c
parent452edd598f60522c11f7f88fdbab27eb36509d1a (diff)
ipv4: Make output route lookup return rtable directly.
Instead of on the stack. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/pptp.c')
-rw-r--r--drivers/net/pptp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/pptp.c b/drivers/net/pptp.c
index 164cfad6ce79..1af549c89d51 100644
--- a/drivers/net/pptp.c
+++ b/drivers/net/pptp.c
@@ -175,7 +175,6 @@ static int pptp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
175 struct pptp_opt *opt = &po->proto.pptp; 175 struct pptp_opt *opt = &po->proto.pptp;
176 struct pptp_gre_header *hdr; 176 struct pptp_gre_header *hdr;
177 unsigned int header_len = sizeof(*hdr); 177 unsigned int header_len = sizeof(*hdr);
178 int err = 0;
179 int islcp; 178 int islcp;
180 int len; 179 int len;
181 unsigned char *data; 180 unsigned char *data;
@@ -198,8 +197,8 @@ static int pptp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
198 .saddr = opt->src_addr.sin_addr.s_addr, 197 .saddr = opt->src_addr.sin_addr.s_addr,
199 .tos = RT_TOS(0) } }, 198 .tos = RT_TOS(0) } },
200 .proto = IPPROTO_GRE }; 199 .proto = IPPROTO_GRE };
201 err = ip_route_output_key(&init_net, &rt, &fl); 200 rt = ip_route_output_key(&init_net, &fl);
202 if (err) 201 if (IS_ERR(rt))
203 goto tx_error; 202 goto tx_error;
204 } 203 }
205 tdev = rt->dst.dev; 204 tdev = rt->dst.dev;
@@ -477,7 +476,8 @@ static int pptp_connect(struct socket *sock, struct sockaddr *uservaddr,
477 .tos = RT_CONN_FLAGS(sk) } }, 476 .tos = RT_CONN_FLAGS(sk) } },
478 .proto = IPPROTO_GRE }; 477 .proto = IPPROTO_GRE };
479 security_sk_classify_flow(sk, &fl); 478 security_sk_classify_flow(sk, &fl);
480 if (ip_route_output_key(&init_net, &rt, &fl)) { 479 rt = ip_route_output_key(&init_net, &fl);
480 if (IS_ERR(rt)) {
481 error = -EHOSTUNREACH; 481 error = -EHOSTUNREACH;
482 goto end; 482 goto end;
483 } 483 }