diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml index a1e4284763..8ec662c3ac 100644 --- a/man/systemd.socket.xml +++ b/man/systemd.socket.xml @@ -697,10 +697,11 @@ PassPacketInfo= Takes a boolean value. This controls the IP_PKTINFO, - IPV6_RECVPKTINFO and NETLINK_PKTINFO socket options, which - enable reception of additional per-packet metadata as ancillary message, on - AF_INET, AF_INET6 and AF_UNIX sockets. - Defaults to . + IPV6_RECVPKTINFO, NETLINK_PKTINFO or + PACKET_AUXDATA socket options, which enable reception of additional per-packet + metadata as ancillary message, on AF_INET, AF_INET6, + AF_UNIX and AF_PACKET sockets. Defaults to + . diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c index f2e1148e87..6f57b2a3c4 100644 --- a/src/basic/socket-util.c +++ b/src/basic/socket-util.c @@ -1240,6 +1240,9 @@ int socket_set_recvpktinfo(int fd, int af, bool b) { case AF_NETLINK: return setsockopt_int(fd, SOL_NETLINK, NETLINK_PKTINFO, b); + case AF_PACKET: + return setsockopt_int(fd, SOL_PACKET, PACKET_AUXDATA, b); + default: return -EAFNOSUPPORT; }