Convert all uses of uint8/16/32 to _t in nmbd and the include file.
[samba.git] / source3 / nmbd / nmbd_subnetdb.c
index 666679a90b4a80c2a61cc77c2f50df930891b263..5c9e4c7eb26524541b84fba2193112a1e2fc7589 100644 (file)
@@ -37,7 +37,7 @@ struct subnet_record *unicast_subnet = NULL;
 struct subnet_record *remote_broadcast_subnet = NULL;
 struct subnet_record *wins_server_subnet = NULL;
 
-extern uint16 samba_nb_type; /* Samba's NetBIOS name type. */
+extern uint16_t samba_nb_type; /* Samba's NetBIOS name type. */
 
 /****************************************************************************
   Add a subnet into the list.
@@ -56,13 +56,21 @@ yet and it may be in use by a response record
 
 void close_subnet(struct subnet_record *subrec)
 {
+       if (subrec->nmb_sock != -1) {
+               close(subrec->nmb_sock);
+               subrec->nmb_sock = -1;
+       }
+       if (subrec->nmb_bcast != -1) {
+               close(subrec->nmb_bcast);
+               subrec->nmb_bcast = -1;
+       }
        if (subrec->dgram_sock != -1) {
                close(subrec->dgram_sock);
                subrec->dgram_sock = -1;
        }
-       if (subrec->nmb_sock != -1) {
-               close(subrec->nmb_sock);
-               subrec->nmb_sock = -1;
+       if (subrec->dgram_bcast != -1) {
+               close(subrec->dgram_bcast);
+               subrec->dgram_bcast = -1;
        }
 
        DLIST_REMOVE(subnetlist, subrec);
@@ -239,8 +247,11 @@ bool create_subnets(void)
 
        /* Only count IPv4, non-loopback interfaces. */
        if (iface_count_v4_nl() == 0) {
-               DEBUG(0,("create_subnets: No local IPv4 non-loopback interfaces !\n"));
-               DEBUG(0,("create_subnets: Waiting for an interface to appear ...\n"));
+               daemon_status("nmbd",
+                             "No local IPv4 non-loopback interfaces "
+                             "available, waiting for interface ...");
+               DEBUG(0,("NOTE: NetBIOS name resolution is not supported for "
+                        "Internet Protocol Version 6 (IPv6).\n"));
        }
 
        /* We only count IPv4, non-loopback interfaces here. */