More logging

This commit is contained in:
Josh Deprez 2024-04-12 15:30:05 +10:00
parent bf5f3f00cf
commit 10c447c78d
No known key found for this signature in database

View file

@ -417,6 +417,12 @@ func handleNBPInAURP(pcapHandle *pcap.Handle, myHWAddr ethernet.Addr, ddpkt *ddp
return fmt.Errorf("can't handle %v", nbpkt.Function)
}
if len(nbpkt.Tuples) < 1 {
return fmt.Errorf("no tuples in NBP packet")
}
log.Printf("NBP/DDP/AURP: Converting FwdReq to LkUp (%v)", nbpkt.Tuples[0])
// Convert it to a LkUp and broadcast on EtherTalk
nbpkt.Function = nbp.FunctionLkUp
nbpRaw, err := nbpkt.Marshal()