Use packets domain for packet validation, not remote sytems address

This commit is contained in:
Deon George 2024-05-21 23:05:03 +10:00
parent b20878e378
commit 58dc090c83

View File

@ -78,7 +78,7 @@ class PacketProcess implements ShouldQueue
break;
}
if (! our_nodes($this->do)->contains($pkt->fftn)) {
if (! our_nodes($pkt->fftn->zone->domain)->contains($pkt->fftn)) {
Log::error(sprintf('%s:! Packet [%s] is from a system that is not configured with us? [%s] for [%s]',self::LOGKEY,$this->filename,$pkt->fftn_t,$this->do->name));
// @todo Notification::route('netmail',$pkt->fftn)->notify(new UnexpectedPacketFromYou($this->filename));
@ -87,7 +87,7 @@ class PacketProcess implements ShouldQueue
}
// Check the packet is to our address, if not we'll reject it.
if (! our_address($this->do)->contains($pkt->tftn)) {
if (! our_address($pkt->tftn->zone->domain)->contains($pkt->tftn)) {
Log::error(sprintf('%s:! Packet [%s] is not to our address? [%s]',self::LOGKEY,$this->filename,$pkt->tftn->ftn));
// @todo Notification::route('netmail',$pkt->fftn)->notify(new UnexpectedPacketToUs($this->filename));