summaryrefslogtreecommitdiffstats
path: root/net/sctp/protocol.c
diff options
context:
space:
mode:
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>2015-07-17 17:34:17 +0200
committerDavid S. Miller <davem@davemloft.net>2015-07-21 09:20:17 +0200
commit07868284e530d52f72b14b800398a8fefa7cf5d0 (patch)
tree9289134f5d0138c793f6ca1a43bbcace0bf1fc6d /net/sctp/protocol.c
parentnet/vxlan: Fix kernel unaligned access in __vxlan_find_mac (diff)
downloadlinux-07868284e530d52f72b14b800398a8fefa7cf5d0.tar.xz
linux-07868284e530d52f72b14b800398a8fefa7cf5d0.zip
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 <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/protocol.c')
-rw-r--r--net/sctp/protocol.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 59e80356672b..fa80fe4f2362 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -489,21 +489,23 @@ static void sctp_v4_get_dst(struct sctp_transport *t, union sctp_addr *saddr,
list_for_each_entry_rcu(laddr, &bp->address_list, list) {
if (!laddr->valid)
continue;
- if ((laddr->state == SCTP_ADDR_SRC) &&
- (AF_INET == laddr->a.sa.sa_family)) {
- fl4->fl4_sport = laddr->a.v4.sin_port;
- flowi4_update_output(fl4,
- asoc->base.sk->sk_bound_dev_if,
- RT_CONN_FLAGS(asoc->base.sk),
- daddr->v4.sin_addr.s_addr,
- laddr->a.v4.sin_addr.s_addr);
-
- rt = ip_route_output_key(sock_net(sk), fl4);
- if (!IS_ERR(rt)) {
- dst = &rt->dst;
- goto out_unlock;
- }
- }
+ if (laddr->state != SCTP_ADDR_SRC ||
+ AF_INET != laddr->a.sa.sa_family)
+ continue;
+
+ fl4->fl4_sport = laddr->a.v4.sin_port;
+ flowi4_update_output(fl4,
+ asoc->base.sk->sk_bound_dev_if,
+ RT_CONN_FLAGS(asoc->base.sk),
+ daddr->v4.sin_addr.s_addr,
+ laddr->a.v4.sin_addr.s_addr);
+
+ rt = ip_route_output_key(sock_net(sk), fl4);
+ if (IS_ERR(rt))
+ continue;
+
+ dst = &rt->dst;
+ break;
}
out_unlock: