summaryrefslogtreecommitdiff
path: root/source4/nbt_server/winswack.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/nbt_server/winswack.c')
-rw-r--r--source4/nbt_server/winswack.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source4/nbt_server/winswack.c b/source4/nbt_server/winswack.c
index 190b1cdec7..da8efff8d9 100644
--- a/source4/nbt_server/winswack.c
+++ b/source4/nbt_server/winswack.c
@@ -57,7 +57,15 @@ static void wins_wack_allow(struct wack_state *state)
{
uint32_t ttl;
time_t now = time(NULL);
- struct winsdb_record *rec = state->rec;
+ struct winsdb_record *rec = state->rec, *rec2;
+
+ rec2 = winsdb_load(state->winssrv, rec->name, state);
+ if (rec2 == NULL || rec2->version != rec->version) {
+ DEBUG(1,("WINS: record %s changed during WACK - failing registration\n",
+ nbt_name_string(state, rec->name)));
+ wins_wack_deny(state);
+ return;
+ }
nbtd_name_registration_reply(state->nbtsock, state->request_packet,
state->src_address, state->src_port, NBT_RCODE_OK);