File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ type Pkt struct {
2020
2121 PitToken []byte
2222 CongestionMark enc.Optional [uint64 ]
23- CachePolicy * uint64
2423
2524 IncomingFaceID uint64
2625 NextHopFaceID enc.Optional [uint64 ]
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import (
1616 defn "github.com/named-data/ndnd/fw/defn"
1717 "github.com/named-data/ndnd/fw/dispatch"
1818 enc "github.com/named-data/ndnd/std/encoding"
19- "github.com/named-data/ndnd/std/utils"
2019)
2120
2221const lpPacketOverhead = 1 + 3 + 1 + 3 // LpPacket+Fragment
@@ -336,16 +335,9 @@ func (l *NDNLPLinkService) handleIncomingFrame(frame []byte) {
336335 pkt .NextHopFaceID = LP .NextHopFaceId
337336 }
338337
339- // Local cache policy
340- if l .options .IsLocalCachePolicyEnabled && LP .CachePolicy != nil {
341- pkt .CachePolicy = utils .IdPtr (LP .CachePolicy .CachePolicyType )
342- }
343-
344- // PIT Token
345- if len (LP .PitToken ) > 0 {
346- pkt .PitToken = make ([]byte , len (LP .PitToken ))
347- copy (pkt .PitToken , LP .PitToken )
348- }
338+ // No need to copy the pit token since it's already in its own buffer
339+ // See the generated code for defn.FwLpPacket
340+ pkt .PitToken = LP .PitToken
349341
350342 // Parse inner packet in place
351343 L3 , err := defn .ParseFwPacket (enc .NewWireView (fragment ), false )
You can’t perform that action at this time.
0 commit comments