continue;
/* Do we already have the broadcast address open? */
- if (interf->flags & INT_BCASTOPEN)
+ if (interf->flags & INT_BCASTOPEN) {
+ /* account for already open interfaces to aviod misleading warning below */
+ nif++;
continue;
+ }
/*
* Try to open the broadcast address
*/
interf->family = AF_INET;
interf->bfd = open_socket(&interf->bcast,
- INT_BROADCAST, 1, interf);
+ INT_BROADCAST, 0, interf);
/*
* If we succeeded then we use it otherwise
if (nif > 0)
printf("io_setbclient: Opened broadcast clients\n");
#endif
- if (nif == 0)
- netsyslog(LOG_ERR, "Unable to listen for broadcasts, no broadcast interfaces available");
+ if (nif == 0)
+ netsyslog(LOG_ERR, "Unable to listen for broadcasts, no broadcast interfaces available");
#else
netsyslog(LOG_ERR, "io_setbclient: Broadcast Client disabled by build");
#endif
#ifdef OS_NEEDS_REUSEADDR_FOR_IFADDRBIND
/*
- * some OSes don't allow bindinf to more specific
+ * some OSes don't allow binding to more specific
* addresses if a wildcard address already bound
* to the port and SO_REUSEADDR is not set
*/