mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
[IPV6]: Fix some code/comment formatting in ip6_dst_output().
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
06ef921d60
commit
d76e60a5b5
1 changed files with 21 additions and 20 deletions
|
@ -733,28 +733,29 @@ int ip6_dst_lookup(struct sock *sk, struct dst_entry **dst, struct flowi *fl)
|
|||
if (*dst) {
|
||||
struct rt6_info *rt = (struct rt6_info*)*dst;
|
||||
|
||||
/* Yes, checking route validity in not connected
|
||||
case is not very simple. Take into account,
|
||||
that we do not support routing by source, TOS,
|
||||
and MSG_DONTROUTE --ANK (980726)
|
||||
|
||||
1. If route was host route, check that
|
||||
cached destination is current.
|
||||
If it is network route, we still may
|
||||
check its validity using saved pointer
|
||||
to the last used address: daddr_cache.
|
||||
We do not want to save whole address now,
|
||||
(because main consumer of this service
|
||||
is tcp, which has not this problem),
|
||||
so that the last trick works only on connected
|
||||
sockets.
|
||||
2. oif also should be the same.
|
||||
*/
|
||||
|
||||
/* Yes, checking route validity in not connected
|
||||
* case is not very simple. Take into account,
|
||||
* that we do not support routing by source, TOS,
|
||||
* and MSG_DONTROUTE --ANK (980726)
|
||||
*
|
||||
* 1. If route was host route, check that
|
||||
* cached destination is current.
|
||||
* If it is network route, we still may
|
||||
* check its validity using saved pointer
|
||||
* to the last used address: daddr_cache.
|
||||
* We do not want to save whole address now,
|
||||
* (because main consumer of this service
|
||||
* is tcp, which has not this problem),
|
||||
* so that the last trick works only on connected
|
||||
* sockets.
|
||||
* 2. oif also should be the same.
|
||||
*/
|
||||
if (((rt->rt6i_dst.plen != 128 ||
|
||||
!ipv6_addr_equal(&fl->fl6_dst, &rt->rt6i_dst.addr))
|
||||
!ipv6_addr_equal(&fl->fl6_dst,
|
||||
&rt->rt6i_dst.addr))
|
||||
&& (np->daddr_cache == NULL ||
|
||||
!ipv6_addr_equal(&fl->fl6_dst, np->daddr_cache)))
|
||||
!ipv6_addr_equal(&fl->fl6_dst,
|
||||
np->daddr_cache)))
|
||||
|| (fl->oif && fl->oif != (*dst)->dev->ifindex)) {
|
||||
dst_release(*dst);
|
||||
*dst = NULL;
|
||||
|
|
Loading…
Reference in a new issue