-
Notifications
You must be signed in to change notification settings - Fork 754
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix FouList attribute body truncated error with kernel 5.2+
fou module added a bunch of new attributes in commit torvalds/linux@1713cb3 which caused the old parsing logic failed, fix and add support for these attrributes.
- Loading branch information
1 parent
b1ce50c
commit a018296
Showing
4 changed files
with
74 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
package netlink | ||
|
||
import ( | ||
"errors" | ||
) | ||
|
||
var ( | ||
// ErrAttrHeaderTruncated is returned when a netlink attribute's header is | ||
// truncated. | ||
ErrAttrHeaderTruncated = errors.New("attribute header truncated") | ||
// ErrAttrBodyTruncated is returned when a netlink attribute's body is | ||
// truncated. | ||
ErrAttrBodyTruncated = errors.New("attribute body truncated") | ||
"net" | ||
) | ||
|
||
type Fou struct { | ||
Family int | ||
Port int | ||
Protocol int | ||
EncapType int | ||
Local net.IP | ||
Peer net.IP | ||
PeerPort int | ||
IfIndex int | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//go:build !linux | ||
// +build !linux | ||
|
||
package netlink | ||
|