Skip to content

Commit

Permalink
add skb priority
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Lehner <[email protected]>
  • Loading branch information
florianl committed Sep 24, 2022
1 parent eeaf99d commit 5406900
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ func extractAttribute(log *log.Logger, a *Attribute, data []byte) error {
case nfQaL2HDR:
l2hdr := ad.Bytes()
a.L2Hdr = &l2hdr
case nfQaPriority:
skbPrio := ad.Uint32()
a.SkbPrio = &skbPrio
default:
log.Printf("Unknown attribute Type: 0x%x\tData: %v\n", ad.Type(), ad.Bytes())
}
Expand Down
2 changes: 2 additions & 0 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type Attribute struct {
CtInfo *uint32
SkbInfo *[]byte
Exp *[]byte
SkbPrio *uint32
}

// HookFunc is a function, that receives events from a Netlinkgroup
Expand Down Expand Up @@ -109,6 +110,7 @@ const (
nfQaSecCtx /* security context string */
nfQaVLAN /* nested attribute: packet vlan info */
nfQaL2HDR /* full L2 header */
nfQaPriority /* skb->priority */
)

const (
Expand Down

0 comments on commit 5406900

Please sign in to comment.