diff options
author | John Kohl <jtkohl@mit.edu> | 1990-01-10 09:05:44 +0000 |
---|---|---|
committer | John Kohl <jtkohl@mit.edu> | 1990-01-10 09:05:44 +0000 |
commit | 2951f4f6c05176cc516d2cd8966423fb12209e60 (patch) | |
tree | 0e374e82cf5b3d28ec8de150898d988f1b45e27a /server/bdump.c | |
parent | 3a3a5695dd0e276dc9c1b5d4cfd4b43e2765551f (diff) |
code to flush subs for bad entries (for compatibility with older
servers)
Diffstat (limited to 'server/bdump.c')
-rw-r--r-- | server/bdump.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server/bdump.c b/server/bdump.c index a6f95d8..85d31c8 100644 --- a/server/bdump.c +++ b/server/bdump.c @@ -745,6 +745,7 @@ ZServerDesc_t *server; ZClient_t *client = NULLZCNT; struct sockaddr_in current_who; int who_valid = 0; + int flushing_subs = 0; #ifdef KERBEROS register char *cp; #endif /* KERBEROS */ @@ -845,6 +846,15 @@ ZServerDesc_t *server; } else if (!strcmp(notice.z_opcode, ADMIN_NEWCLT)) { /* register a new client */ notice.z_port = htons((u_short)atoi(notice.z_message)); + if (ntohs(notice.z_port) == 0) { + /* this is a bogus client from an older rev. + server, so we just flush it. */ + syslog(LOG_ERR, "brl flushing %s/0", + inet_ntoa(current_who.sin_addr)); + flushing_subs = 1; + continue; /* while loop */ + } + flushing_subs = 0; if ((retval = client_register(¬ice, ¤t_who, &client, @@ -871,6 +881,8 @@ ZServerDesc_t *server; } #endif /* KERBEROS */ } else if (!strcmp(notice.z_opcode, CLIENT_SUBSCRIBE)) { + if (flushing_subs) + continue; /* while loop */ /* a subscription packet */ if (!client) { syslog(LOG_ERR, "brl no client"); |