diff --git a/rule.go b/rule.go index e0c43b8..39594cf 100644 --- a/rule.go +++ b/rule.go @@ -50,10 +50,8 @@ type Rule struct { // Position can be set to the Handle of another Rule to insert the new Rule // before (InsertRule) or after (AddRule) the existing rule. Position uint64 - // The list of possible flags are specified by nftnl_rule_attr, see - // https://git.netfilter.org/libnftnl/tree/include/libnftnl/rule.h#n21 - // Current nftables go implementation supports only - // NFTNL_RULE_POSITION flag for setting rule at position 0 + // Deprecated: The feature for which this field was added never worked. + // The field may be removed in a later version. Flags uint32 // PositionID can be set to the ID of another Rule, same as Position, for when // the existing rule is not yet committed. @@ -185,7 +183,7 @@ func (cc *Conn) newRule(r *Rule, op ruleOperation) *Rule { flags = netlink.Request | netlink.Acknowledge | netlink.Replace } - if r.Position != 0 || (r.Flags&(1<