]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
tweak comment about not using SO_REUSEADDR for Dir & Fd SourceAddress
authorAlain Spineux <alain@baculasystems.com>
Mon, 3 Aug 2020 10:07:29 +0000 (12:07 +0200)
committerEric Bollengier <eric@baculasystems.com>
Tue, 1 Mar 2022 14:36:17 +0000 (15:36 +0100)
bacula/src/lib/bsockcore.c

index 7cb6aea0f111b095608993aaccd2c3f5854681fb..28efbeae3a28f94edde9b06c68d2c2f39bc04120 100644 (file)
@@ -390,6 +390,9 @@ bool BSOCKCORE::open(JCR *jcr, const char *name, char *host, char *service,
 
       /* Bind to the source address if it is set */
       if (src_addr) {
+         /* It is not required to use SO_REUSEADDR here as DirSourceAddress &
+          * FdSourceAddress don't force the port of the source, only the address
+          */
          if (bind(sockfd, src_addr->get_sockaddr(), src_addr->get_sockaddr_len()) < 0) {
             berrno be;
             save_errno = errno;