You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Shift register boundary checks from `evaluate`
(hot path) to rule `init` (once at setup).
- Remove `registerData` interfaces with concrete types to
eliminate transient heap allocations and interface overhead
in the evaluation hot path.
- Fix register store validation to match Linux kernel behavior
(net/netfilter/nf_tables_api.c:nft_validate_register_store).
Instead of hard-limiting to 4 or 16 bytes,
we validate against the 64-byte total array limit.
- nft_payload: safeguard signed-unsigned overflow.
PiperOrigin-RevId: 888913686
returnnil, syserr.NewAnnotatedError(syserr.ErrInvalidArgument, fmt.Sprintf("bitwise boolean operation cannot use more than %d bytes", linux.NFT_REG_SIZE))
returnnil, syserr.NewAnnotatedError(syserr.ErrInvalidArgument, fmt.Sprintf("meta load operation cannot use 4-byte register as destination for key %v", key))
55
56
}
56
-
57
-
return&metaLoad{key: key, dreg: dreg}, nil
57
+
dregIdx, err:=regNumToIdx(dreg, blen)
58
+
iferr!=nil {
59
+
returnnil, err
60
+
}
61
+
return&metaLoad{key: key, dregIdx: dregIdx}, nil
58
62
}
59
63
60
64
// evaluate for MetaLoad loads specific meta data into the destination register.
0 commit comments