aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pptp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-05-03 23:25:42 -0400
committerDavid S. Miller <davem@davemloft.net>2011-05-03 23:25:42 -0400
commit31e4543db29fb85496a122b965d6482c8d1a2bfe (patch)
tree3e49d61a1202e1b3c8c71e422f3fd8e4f2616d01 /drivers/net/pptp.c
parentf1390160ddcd64a3cfd48b3280d0a616a31b9520 (diff)
ipv4: Make caller provide on-stack flow key to ip_route_output_ports().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/pptp.c')
-rw-r--r--drivers/net/pptp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/pptp.c b/drivers/net/pptp.c
index 51dfcf8023c7..e771e8d27eb7 100644
--- a/drivers/net/pptp.c
+++ b/drivers/net/pptp.c
@@ -175,6 +175,7 @@ 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 struct flowi4 fl4;
178 int islcp; 179 int islcp;
179 int len; 180 int len;
180 unsigned char *data; 181 unsigned char *data;
@@ -189,7 +190,7 @@ static int pptp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
189 if (sk_pppox(po)->sk_state & PPPOX_DEAD) 190 if (sk_pppox(po)->sk_state & PPPOX_DEAD)
190 goto tx_error; 191 goto tx_error;
191 192
192 rt = ip_route_output_ports(&init_net, NULL, 193 rt = ip_route_output_ports(&init_net, &fl4, NULL,
193 opt->dst_addr.sin_addr.s_addr, 194 opt->dst_addr.sin_addr.s_addr,
194 opt->src_addr.sin_addr.s_addr, 195 opt->src_addr.sin_addr.s_addr,
195 0, 0, IPPROTO_GRE, 196 0, 0, IPPROTO_GRE,
@@ -434,6 +435,7 @@ static int pptp_connect(struct socket *sock, struct sockaddr *uservaddr,
434 struct pppox_sock *po = pppox_sk(sk); 435 struct pppox_sock *po = pppox_sk(sk);
435 struct pptp_opt *opt = &po->proto.pptp; 436 struct pptp_opt *opt = &po->proto.pptp;
436 struct rtable *rt; 437 struct rtable *rt;
438 struct flowi4 fl4;
437 int error = 0; 439 int error = 0;
438 440
439 if (sp->sa_protocol != PX_PROTO_PPTP) 441 if (sp->sa_protocol != PX_PROTO_PPTP)
@@ -463,7 +465,7 @@ static int pptp_connect(struct socket *sock, struct sockaddr *uservaddr,
463 po->chan.private = sk; 465 po->chan.private = sk;
464 po->chan.ops = &pptp_chan_ops; 466 po->chan.ops = &pptp_chan_ops;
465 467
466 rt = ip_route_output_ports(&init_net, sk, 468 rt = ip_route_output_ports(&init_net, &fl4, sk,
467 opt->dst_addr.sin_addr.s_addr, 469 opt->dst_addr.sin_addr.s_addr,
468 opt->src_addr.sin_addr.s_addr, 470 opt->src_addr.sin_addr.s_addr,
469 0, 0, 471 0, 0,