[PATCH v2] net/af_packet: add option to ignore outgoing packets
Stephen Hemminger
stephen at networkplumber.org
Mon Oct 5 18:41:11 CEST 2026
On Mon, 5 Oct 2026 01:28:09 +0100
Frank Dressler <frank at dressler.pro> wrote:
>
> + if (ignore_outgoing) {
> +#if defined(PACKET_IGNORE_OUTGOING)
> + rc = setsockopt(qsockfd, SOL_PACKET, PACKET_IGNORE_OUTGOING,
> + &ignore_outgoing, sizeof(ignore_outgoing));
> + if (rc == -1) {
> + PMD_LOG_ERRNO(ERR,
> + "%s: could not set PACKET_IGNORE_OUTGOING on AF_PACKET socket for %s",
> + name, pair->value);
> + goto error;
> + }
> +#endif
> + }
> +
Since PACKET_IGNORE_OUTGOING has been in kernel uapi since 4.19 the #ifdef here is not needed.
More information about the dev
mailing list