Skip to content

Commit

Permalink
Comments r1
Browse files Browse the repository at this point in the history
  • Loading branch information
sgmonroy committed Oct 18, 2018
1 parent 8d1af38 commit 51397ca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions go/border/rpkt/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,13 @@ func (rp *RtrPkt) validateLocalIF(ifid *common.IFIDType) error {
// mkInfoPathOffsets is a helper function to create an scmp.InfoPathOffsets
// instance from the current packet.
func (rp *RtrPkt) mkInfoPathOffsets() scmp.Info {
if curr, err := rp.IFCurr(); curr == nil || err != nil {
return nil
var ifid uint16
if curr, err := rp.IFCurr(); curr != nil && err == nil {
ifid = uint16(*curr)
}
return &scmp.InfoPathOffsets{
InfoF: uint16(rp.CmnHdr.CurrInfoF), HopF: uint16(rp.CmnHdr.CurrHopF),
IfID: uint16(*rp.ifCurr), Ingress: rp.DirFrom == rcmn.DirExternal,
IfID: ifid, Ingress: rp.DirFrom == rcmn.DirExternal,
}
}

Expand Down

0 comments on commit 51397ca

Please sign in to comment.