use TableFamilyUnspecified (NFPROTO_UNSPEC) instead of AF_UNSPEC (#165)
This commit is contained in:
parent
58da7d8bf3
commit
06687b6e34
2
chain.go
2
chain.go
|
@ -184,7 +184,7 @@ func (cc *Conn) ListChains() ([]*Chain, error) {
|
|||
Type: netlink.HeaderType((unix.NFNL_SUBSYS_NFTABLES << 8) | unix.NFT_MSG_GETCHAIN),
|
||||
Flags: netlink.Request | netlink.Dump,
|
||||
},
|
||||
Data: extraHeader(uint8(unix.AF_UNSPEC), 0),
|
||||
Data: extraHeader(uint8(TableFamilyUnspecified), 0),
|
||||
}
|
||||
|
||||
response, err := conn.Execute(msg)
|
||||
|
|
3
table.go
3
table.go
|
@ -28,6 +28,7 @@ type TableFamily byte
|
|||
|
||||
// Possible TableFamily values.
|
||||
const (
|
||||
TableFamilyUnspecified TableFamily = unix.NFPROTO_UNSPEC
|
||||
TableFamilyINet TableFamily = unix.NFPROTO_INET
|
||||
TableFamilyIPv4 TableFamily = unix.NFPROTO_IPV4
|
||||
TableFamilyIPv6 TableFamily = unix.NFPROTO_IPV6
|
||||
|
@ -111,7 +112,7 @@ func (cc *Conn) ListTables() ([]*Table, error) {
|
|||
Type: netlink.HeaderType((unix.NFNL_SUBSYS_NFTABLES << 8) | unix.NFT_MSG_GETTABLE),
|
||||
Flags: netlink.Request | netlink.Dump,
|
||||
},
|
||||
Data: extraHeader(uint8(unix.AF_UNSPEC), 0),
|
||||
Data: extraHeader(uint8(TableFamilyUnspecified), 0),
|
||||
}
|
||||
|
||||
response, err := conn.Execute(msg)
|
||||
|
|
Loading…
Reference in New Issue