aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
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 /net/ipv6
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 'net/ipv6')
-rw-r--r--net/ipv6/ip6_tunnel.c5
-rw-r--r--net/ipv6/sit.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 9dd0e964b8bd..3dff27cba95c 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -537,6 +537,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
537 struct sk_buff *skb2; 537 struct sk_buff *skb2;
538 const struct iphdr *eiph; 538 const struct iphdr *eiph;
539 struct rtable *rt; 539 struct rtable *rt;
540 struct flowi4 fl4;
540 541
541 err = ip6_tnl_err(skb, IPPROTO_IPIP, opt, &rel_type, &rel_code, 542 err = ip6_tnl_err(skb, IPPROTO_IPIP, opt, &rel_type, &rel_code,
542 &rel_msg, &rel_info, offset); 543 &rel_msg, &rel_info, offset);
@@ -577,7 +578,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
577 eiph = ip_hdr(skb2); 578 eiph = ip_hdr(skb2);
578 579
579 /* Try to guess incoming interface */ 580 /* Try to guess incoming interface */
580 rt = ip_route_output_ports(dev_net(skb->dev), NULL, 581 rt = ip_route_output_ports(dev_net(skb->dev), &fl4, NULL,
581 eiph->saddr, 0, 582 eiph->saddr, 0,
582 0, 0, 583 0, 0,
583 IPPROTO_IPIP, RT_TOS(eiph->tos), 0); 584 IPPROTO_IPIP, RT_TOS(eiph->tos), 0);
@@ -590,7 +591,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
590 if (rt->rt_flags & RTCF_LOCAL) { 591 if (rt->rt_flags & RTCF_LOCAL) {
591 ip_rt_put(rt); 592 ip_rt_put(rt);
592 rt = NULL; 593 rt = NULL;
593 rt = ip_route_output_ports(dev_net(skb->dev), NULL, 594 rt = ip_route_output_ports(dev_net(skb->dev), &fl4, NULL,
594 eiph->daddr, eiph->saddr, 595 eiph->daddr, eiph->saddr,
595 0, 0, 596 0, 0,
596 IPPROTO_IPIP, 597 IPPROTO_IPIP,
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 34d896426701..a24fb14d91f3 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -674,6 +674,7 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
674 struct iphdr *iph; /* Our new IP header */ 674 struct iphdr *iph; /* Our new IP header */
675 unsigned int max_headroom; /* The extra header space needed */ 675 unsigned int max_headroom; /* The extra header space needed */
676 __be32 dst = tiph->daddr; 676 __be32 dst = tiph->daddr;
677 struct flowi4 fl4;
677 int mtu; 678 int mtu;
678 const struct in6_addr *addr6; 679 const struct in6_addr *addr6;
679 int addr_type; 680 int addr_type;
@@ -733,7 +734,7 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
733 dst = addr6->s6_addr32[3]; 734 dst = addr6->s6_addr32[3];
734 } 735 }
735 736
736 rt = ip_route_output_ports(dev_net(dev), NULL, 737 rt = ip_route_output_ports(dev_net(dev), &fl4, NULL,
737 dst, tiph->saddr, 738 dst, tiph->saddr,
738 0, 0, 739 0, 0,
739 IPPROTO_IPV6, RT_TOS(tos), 740 IPPROTO_IPV6, RT_TOS(tos),
@@ -851,12 +852,13 @@ static void ipip6_tunnel_bind_dev(struct net_device *dev)
851 struct net_device *tdev = NULL; 852 struct net_device *tdev = NULL;
852 struct ip_tunnel *tunnel; 853 struct ip_tunnel *tunnel;
853 const struct iphdr *iph; 854 const struct iphdr *iph;
855 struct flowi4 fl4;
854 856
855 tunnel = netdev_priv(dev); 857 tunnel = netdev_priv(dev);
856 iph = &tunnel->parms.iph; 858 iph = &tunnel->parms.iph;
857 859
858 if (iph->daddr) { 860 if (iph->daddr) {
859 struct rtable *rt = ip_route_output_ports(dev_net(dev), NULL, 861 struct rtable *rt = ip_route_output_ports(dev_net(dev), &fl4, NULL,
860 iph->daddr, iph->saddr, 862 iph->daddr, iph->saddr,
861 0, 0, 863 0, 0,
862 IPPROTO_IPV6, 864 IPPROTO_IPV6,