Commit Graph

11 Commits

Author SHA1 Message Date
turekt 535f5eb8da
Fix incorrect netlink acknowledgement handling (#194)
fixes https://github.com/google/nftables/issues/175
2022-10-02 16:01:48 +02:00
Michael Stapelberg a346d51f53 Fetch an acknowledgement for each message that requested one
This fixes error handling when using lasting connections.

fixes #170
2022-06-11 23:33:46 +02:00
thediveo 3e042f75d7 refactor: pass table family when un/marshalling expr 2022-05-15 23:12:26 +02:00
TheDiveO eeaebcf552
add New constructor (with options functions, such as lasting connection)
* Close receiver for lasting netlink connections while defaulting to existing temporary netlink connection usage
* add unit test for New lasting connection, Close and correct default connection handling behavior
* refactor tests to use New constructor
* make Conn mutex un-exported (#159)

fixes issue #157
2022-05-09 13:25:29 +02:00
Matt Layher 611d399a5e
go.mod: use github.com/mdlayher/netlink@v1.4.2 (#136)
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2021-12-09 23:08:14 +01:00
Serguei Bezverkhi 26bcabf490 disable lock when no namespace is needed (#95)
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2020-01-22 22:39:39 +01:00
Michael Stapelberg 2228941ec5 remove extra space 2019-12-22 11:45:11 +01:00
Serguei Bezverkhi 1f2240c488 Flush fix (#85)
Clear messages after netlink return error

Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2019-12-22 11:44:25 +01:00
Serguei Bezverkhi f528bf5cc6 Replace %v with %w to wrap netlink error
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2019-12-20 11:51:15 -05:00
Serguei Bezverkhi 14f3137cde protect cc.messages from racing (#75)
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2019-11-14 16:22:42 +01:00
Ryan Whelan 7bac3e3135 Restructure code base into smaller files (#15)
* Restrcture code base into smaller files

* Package level doc string

* Move ExprsFromMsg back from expr sub-module

* gofmt
2019-05-03 23:54:09 +02:00