summaryrefslogtreecommitdiff
path: root/drivers/net/pptp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-02 14:31:35 -0800
committerDavid S. Miller <davem@davemloft.net>2011-03-02 14:31:35 -0800
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)
struct pptp_opt *opt = &po->proto.pptp;
struct pptp_gre_header *hdr;
unsigned int header_len = sizeof(*hdr);
- int err = 0;
int islcp;
int len;
unsigned char *data;
@@ -198,8 +197,8 @@ static int pptp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
.saddr = opt->src_addr.sin_addr.s_addr,
.tos = RT_TOS(0) } },
.proto = IPPROTO_GRE };
- err = ip_route_output_key(&init_net, &rt, &fl);
- if (err)
+ rt = ip_route_output_key(&init_net, &fl);
+ if (IS_ERR(rt))
goto tx_error;
}
tdev = rt->dst.dev;
@@ -477,7 +476,8 @@ static int pptp_connect(struct socket *sock, struct sockaddr *uservaddr,
.tos = RT_CONN_FLAGS(sk) } },
.proto = IPPROTO_GRE };
security_sk_classify_flow(sk, &fl);
- if (ip_route_output_key(&init_net, &rt, &fl)) {
+ rt = ip_route_output_key(&init_net, &fl);
+ if (IS_ERR(rt)) {
error = -EHOSTUNREACH;
goto end;
}