}
}
}
- if (!realm_which_realm(who)) {
- if (memcmp(¬ice->z_sender_addr.s_addr, &who->sin_addr.s_addr,
- sizeof(notice->z_sender_addr.s_addr))) {
- /* someone is playing games... */
- /* inet_ntoa returns pointer to static area */
- /* max size is 255.255.255.255 */
- char buffer[16];
- strcpy(buffer, inet_ntoa(who->sin_addr));
- if (!auth) {
- syslog(LOG_WARNING,
- "sendit unauthentic fake packet: claimed %s, real %s",
- inet_ntoa(notice->z_sender_addr), buffer);
- clt_ack(notice, who, AUTH_FAILED);
- free_string(class);
- return;
- }
- if (ntohl(notice->z_sender_addr.s_addr) != 0) {
- syslog(LOG_WARNING,
- "sendit invalid address: claimed %s, real %s",
- inet_ntoa(notice->z_sender_addr), buffer);
- clt_ack(notice, who, AUTH_FAILED);
- free_string(class);
- return;
- }
- syslog(LOG_WARNING, "sendit addr mismatch: claimed %s, real %s",
- inet_ntoa(notice->z_sender_addr), buffer);
- }
- }
/* Increment the send counter, used to prevent duplicate sends to
* clients. On the off-chance that we wrap around to 0, skip over