diff options
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r-- | net/ipv6/ip6_output.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 23de98f976d5..a163102f1803 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -909,6 +909,7 @@ static int ip6_dst_lookup_tail(struct net *net, const struct sock *sk, | |||
909 | struct rt6_info *rt; | 909 | struct rt6_info *rt; |
910 | #endif | 910 | #endif |
911 | int err; | 911 | int err; |
912 | int flags = 0; | ||
912 | 913 | ||
913 | /* The correct way to handle this would be to do | 914 | /* The correct way to handle this would be to do |
914 | * ip6_route_get_saddr, and then ip6_route_output; however, | 915 | * ip6_route_get_saddr, and then ip6_route_output; however, |
@@ -940,10 +941,13 @@ static int ip6_dst_lookup_tail(struct net *net, const struct sock *sk, | |||
940 | dst_release(*dst); | 941 | dst_release(*dst); |
941 | *dst = NULL; | 942 | *dst = NULL; |
942 | } | 943 | } |
944 | |||
945 | if (fl6->flowi6_oif) | ||
946 | flags |= RT6_LOOKUP_F_IFACE; | ||
943 | } | 947 | } |
944 | 948 | ||
945 | if (!*dst) | 949 | if (!*dst) |
946 | *dst = ip6_route_output(net, sk, fl6); | 950 | *dst = ip6_route_output_flags(net, sk, fl6, flags); |
947 | 951 | ||
948 | err = (*dst)->error; | 952 | err = (*dst)->error; |
949 | if (err) | 953 | if (err) |