{
NTSTATUS status;
struct nbt_netlogon_packet netlogon;
+ int *replies = dgmslot->private;
printf("netlogon reply from %s:%d\n", src_address, src_port);
}
NDR_PRINT_DEBUG(nbt_netlogon_packet, &netlogon);
+
+ (*replies)++;
}
struct nbt_netlogon_packet logon;
struct nbt_name myname;
NTSTATUS status;
- int timelimit = lp_parm_int(-1, "torture", "timelimit", 10);
struct timeval tv = timeval_current();
+ int replies = 0;
/* try receiving replies on port 138 first, which will only
work if we are root and smbd/nmbd are not running - fall
/* setup a temporary mailslot listener for replies */
dgmslot = dgram_mailslot_temp(dgmsock, "\\MAILSLOT\\NET\\GETDC",
- netlogon_handler, NULL);
+ netlogon_handler, &replies);
ZERO_STRUCT(logon);
}
- while (timeval_elapsed(&tv) < timelimit) {
+ while (timeval_elapsed(&tv) < 5 && replies == 0) {
event_loop_once(dgmsock->event_ctx);
}