From 39e1307682cb23c0007280a8a823d3017808f207 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 8 Sep 2013 04:33:29 +0000 Subject: [PATCH] net: Change makesock_addrinfo() to set given flowopts before SO_REUSEADDR. Should not matter but allows to combine the code that follows. --- net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net.c b/net.c index 5e4f1316..a95f145a 100644 --- a/net.c +++ b/net.c @@ -440,6 +440,7 @@ static int makesock_addrinfo(unsigned l4type, bool passive, struct addrinfo *ai, if (ret < 0) goto get_next_dst; sockfd = ret; + flowopt_setopts(sockfd, fo); /* * Reuse the address on passive sockets to avoid failure on * restart (protocols using listen()) and when creating @@ -453,7 +454,6 @@ static int makesock_addrinfo(unsigned l4type, bool passive, struct addrinfo *ai, para_strerror(-ret)); break; } - flowopt_setopts(sockfd, fo); if (passive) { if (bind(sockfd, src->ai_addr, src->ai_addrlen) < 0) { -- 2.30.2