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 {
20
20
21
21
PitToken []byte
22
22
CongestionMark enc.Optional [uint64 ]
23
- CachePolicy * uint64
24
23
25
24
IncomingFaceID uint64
26
25
NextHopFaceID enc.Optional [uint64 ]
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import (
16
16
defn "github.com/named-data/ndnd/fw/defn"
17
17
"github.com/named-data/ndnd/fw/dispatch"
18
18
enc "github.com/named-data/ndnd/std/encoding"
19
- "github.com/named-data/ndnd/std/utils"
20
19
)
21
20
22
21
const lpPacketOverhead = 1 + 3 + 1 + 3 // LpPacket+Fragment
@@ -336,16 +335,9 @@ func (l *NDNLPLinkService) handleIncomingFrame(frame []byte) {
336
335
pkt .NextHopFaceID = LP .NextHopFaceId
337
336
}
338
337
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
349
341
350
342
// Parse inner packet in place
351
343
L3 , err := defn .ParseFwPacket (enc .NewWireView (fragment ), false )
You can’t perform that action at this time.
0 commit comments