It's not blindingly obvious where this 'found' comes from.
This commit is contained in:
David Wragg committed 2015-04-02 16:37:30 +01:00
1 parent 5648f87717
commit 587a67d701
1 file changed
+3
+3
View File
@@ -164,10 +164,13 @@ func (router *Router) handleCapturedPacket(frameData []byte, dec *EthernetDecode
frameCopy := make([]byte, frameLen, frameLen)
copy(frameCopy, frameData)
// If we don't know which peer corresponds to the dest MAC,
// broadcast it.
if !found {
router.Ourself.Broadcast(df, frameCopy, dec)
return
}
err := router.Ourself.Forward(dstPeer, df, frameCopy, dec)
if ftbe, ok := err.(FrameTooBigError); ok {
err = dec.sendICMPFragNeeded(ftbe.EPMTU, po.WritePacket)