Skip to content

Commit d76e60a

Browse files
committed
[IPV6]: Fix some code/comment formatting in ip6_dst_output().
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 06ef921 commit d76e60a

1 file changed

Lines changed: 21 additions & 20 deletions

File tree

‎net/ipv6/ip6_output.c‎

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -733,28 +733,29 @@ int ip6_dst_lookup(struct sock *sk, struct dst_entry **dst, struct flowi *fl)
733733
if (*dst) {
734734
struct rt6_info *rt = (struct rt6_info*)*dst;
735735

736-
/* Yes, checking route validity in not connected
737-
case is not very simple. Take into account,
738-
that we do not support routing by source, TOS,
739-
and MSG_DONTROUTE --ANK (980726)
740-
741-
1. If route was host route, check that
742-
cached destination is current.
743-
If it is network route, we still may
744-
check its validity using saved pointer
745-
to the last used address: daddr_cache.
746-
We do not want to save whole address now,
747-
(because main consumer of this service
748-
is tcp, which has not this problem),
749-
so that the last trick works only on connected
750-
sockets.
751-
2. oif also should be the same.
752-
*/
753-
736+
/* Yes, checking route validity in not connected
737+
* case is not very simple. Take into account,
738+
* that we do not support routing by source, TOS,
739+
* and MSG_DONTROUTE --ANK (980726)
740+
*
741+
* 1. If route was host route, check that
742+
* cached destination is current.
743+
* If it is network route, we still may
744+
* check its validity using saved pointer
745+
* to the last used address: daddr_cache.
746+
* We do not want to save whole address now,
747+
* (because main consumer of this service
748+
* is tcp, which has not this problem),
749+
* so that the last trick works only on connected
750+
* sockets.
751+
* 2. oif also should be the same.
752+
*/
754753
if (((rt->rt6i_dst.plen != 128 ||
755-
!ipv6_addr_equal(&fl->fl6_dst, &rt->rt6i_dst.addr))
754+
!ipv6_addr_equal(&fl->fl6_dst,
755+
&rt->rt6i_dst.addr))
756756
&& (np->daddr_cache == NULL ||
757-
!ipv6_addr_equal(&fl->fl6_dst, np->daddr_cache)))
757+
!ipv6_addr_equal(&fl->fl6_dst,
758+
np->daddr_cache)))
758759
|| (fl->oif && fl->oif != (*dst)->dev->ifindex)) {
759760
dst_release(*dst);
760761
*dst = NULL;

0 commit comments

Comments
 (0)