udp_poll(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so bestie, this is udp_poll(9) from the Kernel API Manual, and it's here to wait for a UDP event ✨ literally that's the whole vibe πŸ‘‘

✨ SYNOPSIS ✨

__poll_t udp_poll (struct file *file , struct socket *sock , poll_table *wait );

🫢 ARGUMENTS 🫢

  • file β€” the file struct πŸ—‚οΈ like, that file struct.
  • sock β€” the socket 🧦 yep, that socket.
  • wait β€” the poll table πŸ’« the waiting-table situation.

🌸 DESCRIPTION 🌸

so this is the same as datagram poll, except for the special case of blocking sockets 🫢

here's the tea: if an application is using a blocking fd and a packet with a checksum error is in the queue, then it could get a return from select indicating data is available β€” but then it blocks when reading it 😭 not the plot twist we wanted.

so there's special case code added to work around these arguably broken applications πŸ’… periodt.

ngl, that's the whole reason this special case exists β€” those apps are arguably broken, and this is the workaround πŸŽ€

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./net/ipv4/udp.c has the friend group: udp_lib_get_port(9), udp4_lib_lookup1(9), udp4_hwcsum(9), and first_packet_length(9) 🌈 go say hi πŸ‘‹

mwah πŸ’– this little page lives in ./net/ipv4, dated October 2026, and it's literally udp_poll(9) β€” bye bestie! πŸŽ€

πŸ“¦ where this page comes from