Files
akvorado/inlet/flow/input/udp/socket_others.go
Vincent Bernat 5ce0c949f2 inlet/flow: make some of the socket options not fatal
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
2025-09-22 18:33:16 +02:00

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
}