mirror of
https://github.com/soypat/lneto.git
synced 2026-08-21 06:59:04 +00:00
Merge pull request #11 from ddirect/local-arp-tcp-fixes
local-arp-tcp branch fixes
This commit is contained in:
+2
-2
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user