Skip to content

Commit

Permalink
fix: golangci lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
ming-hsien committed Nov 27, 2024
1 parent bfc2192 commit 8de73b9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions internal/context/sm_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,11 @@ func NewSMContext(id string, pduSessID int32) *SMContext {
smContext.Tunnel = NewUPTunnel()

smContext.QoSRuleIDGenerator = idgenerator.NewGenerator(1, 255)
defRuleID, _ := smContext.QoSRuleIDGenerator.Allocate()
smContext.defRuleID = uint8(defRuleID)
if defRuleID, err := smContext.QoSRuleIDGenerator.Allocate(); err != nil {
logger.CtxLog.Warnln("Create Default QoS rule error ", err)
} else {
smContext.defRuleID = uint8(defRuleID)
}

smContext.PacketFilterIDGenerator = idgenerator.NewGenerator(1, 255)
smContext.QFIGenerator = idgenerator.NewGenerator(2, 63) // 1 always reserve for default Qos
Expand Down

0 comments on commit 8de73b9

Please sign in to comment.