Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support AF_BRIDGE familiy frames from ebtables #31

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func extractAttribute(a *Attribute, logger *log.Logger, data []byte) error {
}

func checkHeader(data []byte) int {
if (data[0] == unix.AF_INET || data[0] == unix.AF_INET6) && data[1] == unix.NFNETLINK_V0 {
if (data[0] == unix.AF_INET || data[0] == unix.AF_INET6 || data[0] == unix.AF_BRIDGE) && data[1] == unix.NFNETLINK_V0 {
return 4
}
return 0
Expand Down
1 change: 1 addition & 0 deletions internal/unix/types_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ const (
AF_UNSPEC = linux.AF_UNSPEC
AF_INET = linux.AF_INET
AF_INET6 = linux.AF_INET6
AF_BRIDGE = linux.AF_BRIDGE
)
1 change: 1 addition & 0 deletions internal/unix/types_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ const (
AF_UNSPEC = 0x0
AF_INET = 0x2
AF_INET6 = 0xa
AF_BRIDGE = 0x7
)