Merge pull request #11 from ddirect/local-arp-tcp-fixes

local-arp-tcp branch fixes
This commit is contained in:
Pat Whittingslow
2025-12-30 16:30:20 -03:00
committed by GitHub
3 changed files with 19 additions and 9 deletions
+2 -2
View File
@@ -51,7 +51,7 @@ func (h *Handler) Reset(cfg HandlerConfig) error {
return errors.New("invalid Handler query or pending config")
}
*h = Handler{
connID: h.connID + 1,
connID: h.connID,
ourHWAddr: h.ourHWAddr[:0],
ourProtoAddr: h.ourProtoAddr[:0],
htype: cfg.HardwareType,
@@ -263,7 +263,7 @@ func (h *Handler) Demux(ethFrame []byte, frameOffset int) error {
}
func trySetEthernetDst(ethFrame []byte, dst []byte) {
if len(ethFrame) > 14 {
if len(ethFrame) >= 14 {
copy(ethFrame[:6], dst)
}
}