rule: carry over all table attributes (including family)

fixes https://github.com/google/nftables/issues/150
This commit is contained in:
Michael Stapelberg 2022-04-02 15:00:52 +02:00
parent 5a9391c12f
commit 19672dc9fe
1 changed files with 3 additions and 0 deletions

View File

@ -89,6 +89,9 @@ func (cc *Conn) GetRule(t *Table, c *Chain) ([]*Rule, error) {
if err != nil {
return nil, err
}
// Carry over all Table attributes (including Family), as the Table
// object which ruleFromMsg creates only contains the name.
r.Table = t
rules = append(rules, r)
}