···333333 /* Make sure we can route this packet. */334334 rt = (struct rtable *)__sk_dst_check(sk, 0);335335 if (rt == NULL) {336336+ struct flowi4 fl4;336337 __be32 daddr;337338338339 /* Use correct destination address if we have options. */···345344 * keep trying until route appears or the connection times346345 * itself out.347346 */348348- rt = ip_route_output_ports(sock_net(sk), sk,347347+ rt = ip_route_output_ports(sock_net(sk), &fl4, sk,349348 daddr, inet->inet_saddr,350349 inet->inet_dport,351350 inet->inet_sport,
+10-7
net/ipv4/ipip.c
···442442 struct iphdr *iph; /* Our new IP header */443443 unsigned int max_headroom; /* The extra header space needed */444444 __be32 dst = tiph->daddr;445445+ struct flowi4 fl4;445446 int mtu;446447447448 if (skb->protocol != htons(ETH_P_IP))···461460 goto tx_error_icmp;462461 }463462464464- rt = ip_route_output_ports(dev_net(dev), NULL,463463+ rt = ip_route_output_ports(dev_net(dev), &fl4, NULL,465464 dst, tiph->saddr,466465 0, 0,467466 IPPROTO_IPIP, RT_TOS(tos),···579578 iph = &tunnel->parms.iph;580579581580 if (iph->daddr) {582582- struct rtable *rt = ip_route_output_ports(dev_net(dev), NULL,583583- iph->daddr, iph->saddr,584584- 0, 0,585585- IPPROTO_IPIP,586586- RT_TOS(iph->tos),587587- tunnel->parms.link);581581+ struct rtable *rt;582582+ struct flowi4 fl4;588583584584+ rt = ip_route_output_ports(dev_net(dev), &fl4, NULL,585585+ iph->daddr, iph->saddr,586586+ 0, 0,587587+ IPPROTO_IPIP,588588+ RT_TOS(iph->tos),589589+ tunnel->parms.link);589590 if (!IS_ERR(rt)) {590591 tdev = rt->dst.dev;591592 ip_rt_put(rt);