if (packet.s-address != O/S_sender(packet)) then /* O/S report of sender not who claims to have sent it */ error_out(KRB_AP_ERR_BADADDR); endif if ((packet.r-address is present) and (packet.r-address != local_host_address)) then /* was not sent to proper place */ error_out(KRB_AP_ERR_BADADDR); endif if (((packet.timestamp is present) and (not in_clock_skew(packet.timestamp,packet.usec))) or (packet.timestamp is not present and timestamp expected)) then error_out(KRB_AP_ERR_SKEW); endif if (repeated(packet.timestamp,packet.usec,packet.s-address)) then error_out(KRB_AP_ERR_REPEAT); endif if (((packet.seq-number is present) and ((not in_sequence(packet.seq-number)))) or (packet.seq-number is not present and sequence expected)) then error_out(KRB_AP_ERR_BADORDER); endif if (packet.timestamp not present and packet.seq-number not present) then error_out(KRB_AP_ERR_MODIFIED); endif save_identifier(packet.{timestamp,usec,s-address}, sender_principal(packet)); return PACKET_IS_OK;