diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-01 17:45:33 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-01 17:45:33 -0500 |
commit | 69ead7afdf6028184f713a77376ee26f8aaafdcd (patch) | |
tree | bd5cd86f9786daadfd5425f65106bd1c7383fcc7 /net/ipv6/ip6_output.c | |
parent | 80c0bc9e37adfc892af82cb6aa8cace79f8a96cb (diff) |
ipv6: Normalize arguments to ip6_dst_blackhole().
Return a dst pointer which is potentitally error encoded.
Don't pass original dst pointer by reference, pass a struct net
instead of a socket, and elide the flow argument since it is
unnecessary.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r-- | net/ipv6/ip6_output.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index faf7b9d1d536..ac16f3b2a029 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -1029,7 +1029,7 @@ struct dst_entry *ip6_dst_lookup_flow(struct sock *sk, struct flowi *fl, | |||
1029 | fl->flags |= FLOWI_FLAG_CAN_SLEEP; | 1029 | fl->flags |= FLOWI_FLAG_CAN_SLEEP; |
1030 | err = __xfrm_lookup(sock_net(sk), &dst, fl, sk, 0); | 1030 | err = __xfrm_lookup(sock_net(sk), &dst, fl, sk, 0); |
1031 | if (err == -EREMOTE) | 1031 | if (err == -EREMOTE) |
1032 | err = ip6_dst_blackhole(sk, &dst, fl); | 1032 | return ip6_dst_blackhole(sock_net(sk), dst); |
1033 | if (err) | 1033 | if (err) |
1034 | return ERR_PTR(err); | 1034 | return ERR_PTR(err); |
1035 | } else { | 1035 | } else { |
@@ -1074,7 +1074,7 @@ struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi *fl, | |||
1074 | fl->flags |= FLOWI_FLAG_CAN_SLEEP; | 1074 | fl->flags |= FLOWI_FLAG_CAN_SLEEP; |
1075 | err = __xfrm_lookup(sock_net(sk), &dst, fl, sk, 0); | 1075 | err = __xfrm_lookup(sock_net(sk), &dst, fl, sk, 0); |
1076 | if (err == -EREMOTE) | 1076 | if (err == -EREMOTE) |
1077 | err = ip6_dst_blackhole(sk, &dst, fl); | 1077 | return ip6_dst_blackhole(sock_net(sk), dst); |
1078 | if (err) | 1078 | if (err) |
1079 | return ERR_PTR(err); | 1079 | return ERR_PTR(err); |
1080 | } else { | 1080 | } else { |