-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
afpacket: Fix support for 32-bit x86 arch
afpacket uses syscalls unix.SYS_GETSOCKOPT and unix.SYS_SETSOCKOPT when it needs to call [gs]etsockopt() passing a raw pointer. This doesn't work for 32-bit x86 platforms as there's no such syscall, resulting in: setsockopt packet_rx_ring: function not implemented unix.Syscall(unix.SYS_GETSOCKOPT[=366],...) = 38 // ENOSYS The correct way to call [gs]etsockopt() in this platform is to use the SYS_SOCKETCALL syscall with the right call parameter. This patch refactors the raw [gs]etsockopt() calls in afpacket to use unix.GetsockoptString and unix.SetsockoptString so that it relies on Go runtime to call the appropriate syscall.
- Loading branch information
Showing
2 changed files
with
24 additions
and
34 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
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