Skip to content

Commit 0786828

Browse files
marceloleitnerdavem330
authored andcommitted
sctp: reduce indent level on sctp_v4_get_dst
Paves the day for the next patch. Functionality stays untouched. Signed-off-by: Marcelo Ricardo Leitner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7177a3b commit 0786828

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

net/sctp/protocol.c

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -489,21 +489,23 @@ static void sctp_v4_get_dst(struct sctp_transport *t, union sctp_addr *saddr,
489489
list_for_each_entry_rcu(laddr, &bp->address_list, list) {
490490
if (!laddr->valid)
491491
continue;
492-
if ((laddr->state == SCTP_ADDR_SRC) &&
493-
(AF_INET == laddr->a.sa.sa_family)) {
494-
fl4->fl4_sport = laddr->a.v4.sin_port;
495-
flowi4_update_output(fl4,
496-
asoc->base.sk->sk_bound_dev_if,
497-
RT_CONN_FLAGS(asoc->base.sk),
498-
daddr->v4.sin_addr.s_addr,
499-
laddr->a.v4.sin_addr.s_addr);
500-
501-
rt = ip_route_output_key(sock_net(sk), fl4);
502-
if (!IS_ERR(rt)) {
503-
dst = &rt->dst;
504-
goto out_unlock;
505-
}
506-
}
492+
if (laddr->state != SCTP_ADDR_SRC ||
493+
AF_INET != laddr->a.sa.sa_family)
494+
continue;
495+
496+
fl4->fl4_sport = laddr->a.v4.sin_port;
497+
flowi4_update_output(fl4,
498+
asoc->base.sk->sk_bound_dev_if,
499+
RT_CONN_FLAGS(asoc->base.sk),
500+
daddr->v4.sin_addr.s_addr,
501+
laddr->a.v4.sin_addr.s_addr);
502+
503+
rt = ip_route_output_key(sock_net(sk), fl4);
504+
if (IS_ERR(rt))
505+
continue;
506+
507+
dst = &rt->dst;
508+
break;
507509
}
508510

509511
out_unlock:

0 commit comments

Comments
 (0)