From: Andre Noll Date: Sun, 8 Sep 2013 04:33:29 +0000 (+0000) Subject: net: Change makesock_addrinfo() to set given flowopts before SO_REUSEADDR. X-Git-Tag: v0.5.2~11^2~8 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=39e1307682cb23c0007280a8a823d3017808f207;hp=166c7ec3e1b77ee8d4d8e50dd8314ca4c683ae26 net: Change makesock_addrinfo() to set given flowopts before SO_REUSEADDR. Should not matter but allows to combine the code that follows. --- 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) {