Fix expression parsing for notracking

Fix the expression parsing for non data content like `notracking`
expression.
This commit is contained in:
Rafael Campos Las Heras 2022-04-05 09:26:28 -03:00 committed by Michael Stapelberg
parent 2ba518ec5c
commit c4d774fc49
1 changed files with 4 additions and 0 deletions

View File

@ -227,6 +227,10 @@ func exprsFromMsg(b []byte) ([]expr.Any, error) {
switch ad.Type() { switch ad.Type() {
case unix.NFTA_EXPR_NAME: case unix.NFTA_EXPR_NAME:
name = ad.String() name = ad.String()
if name == "notrack" {
e := &expr.Notrack{}
exprs = append(exprs, e)
}
case unix.NFTA_EXPR_DATA: case unix.NFTA_EXPR_DATA:
var e expr.Any var e expr.Any
switch name { switch name {