mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-11 22:14:02 +01:00
If the kernel is too old for timestamping, it should not be fatal. I prefer to not accept SO_TIMESTAMP_OLD as the size of the timestamp is arch-dependent. Fix #1978
33 lines
713 B
Go
33 lines
713 B
Go
// SPDX-FileCopyrightText: 2022 Free Mobile
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
//go:build !linux
|
|
|
|
package udp
|
|
|
|
import "golang.org/x/sys/unix"
|
|
|
|
var (
|
|
oobLength = 0
|
|
udpSocketOptions = []socketOption{
|
|
{
|
|
// Allow multiple listeners to bind to the same IP
|
|
Name: "SO_REUSEADDR",
|
|
Level: unix.SOL_SOCKET,
|
|
Option: unix.SO_REUSEADDR,
|
|
Mandatory: true,
|
|
}, {
|
|
// Allow multiple listeners to bind to the same port
|
|
Name: "SO_REUSEPORT",
|
|
Level: unix.SOL_SOCKET,
|
|
Option: unix.SO_REUSEPORT,
|
|
Mandatory: true,
|
|
},
|
|
}
|
|
)
|
|
|
|
// parseSocketControlMessage always returns 0.
|
|
func parseSocketControlMessage(_ []byte) (oobMessage, error) {
|
|
return oobMessage{}, nil
|
|
}
|