Fix NBP more?
This commit is contained in:
parent
3587b362db
commit
d58534d5df
1 changed files with 26 additions and 10 deletions
|
@ -70,11 +70,19 @@ func (rtr *Router) HandleNBP(srcHWAddr ethernet.Addr, ddpkt *ddp.ExtPacket) erro
|
||||||
return fmt.Errorf("couldn't marshal LkUp: %v", err)
|
return fmt.Errorf("couldn't marshal LkUp: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
outDDP := *ddpkt
|
outDDP := ddp.ExtPacket{
|
||||||
outDDP.Size = uint16(len(nbpRaw)) + atalk.DDPExtHeaderSize
|
ExtHeader: ddp.ExtHeader{
|
||||||
outDDP.DstNet = 0x0000 // Local network broadcast
|
Size: atalk.DDPExtHeaderSize + uint16(len(nbpRaw)),
|
||||||
outDDP.DstNode = 0xFF // Broadcast node address within the dest network
|
Cksum: 0,
|
||||||
outDDP.Data = nbpRaw
|
SrcNet: ddpkt.SrcNet,
|
||||||
|
SrcNode: ddpkt.SrcNode,
|
||||||
|
SrcSocket: ddpkt.SrcSocket,
|
||||||
|
DstNet: 0x0000, // Local network broadcast
|
||||||
|
DstNode: 0xFF, // Broadcast node address within the dest network
|
||||||
|
DstSocket: 2,
|
||||||
|
},
|
||||||
|
Data: nbpRaw,
|
||||||
|
}
|
||||||
|
|
||||||
log.Printf("NBP: zone multicasting LkUp for tuple %v", tuple)
|
log.Printf("NBP: zone multicasting LkUp for tuple %v", tuple)
|
||||||
if err := rtr.ZoneMulticastEtherTalkDDP(tuple.Zone, &outDDP); err != nil {
|
if err := rtr.ZoneMulticastEtherTalkDDP(tuple.Zone, &outDDP); err != nil {
|
||||||
|
@ -114,11 +122,19 @@ func (rtr *Router) HandleNBP(srcHWAddr ethernet.Addr, ddpkt *ddp.ExtPacket) erro
|
||||||
return fmt.Errorf("couldn't marshal FwdReq: %v", err)
|
return fmt.Errorf("couldn't marshal FwdReq: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
outDDP := *ddpkt
|
outDDP := ddp.ExtPacket{
|
||||||
outDDP.Size = uint16(len(nbpRaw)) + atalk.DDPExtHeaderSize
|
ExtHeader: ddp.ExtHeader{
|
||||||
outDDP.DstNet = z.Network
|
Size: atalk.DDPExtHeaderSize + uint16(len(nbpRaw)),
|
||||||
outDDP.DstNode = 0x00 // Router node address for the dest network
|
Cksum: 0,
|
||||||
outDDP.Data = nbpRaw
|
SrcNet: ddpkt.SrcNet,
|
||||||
|
SrcNode: ddpkt.SrcNode,
|
||||||
|
SrcSocket: ddpkt.SrcSocket,
|
||||||
|
DstNet: z.Network,
|
||||||
|
DstNode: 0x01, // Router node address for the dest network
|
||||||
|
DstSocket: 2,
|
||||||
|
},
|
||||||
|
Data: nbpRaw,
|
||||||
|
}
|
||||||
|
|
||||||
outDDPRaw, err := ddp.ExtMarshal(outDDP)
|
outDDPRaw, err := ddp.ExtMarshal(outDDP)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue