While trying to disable IPv4 I went down the rabbit hole of raw sockets with DHCP and firewalls, so thought I'd share it with you.
Handy links:
https://man7.org/linux/man-pages/man2/socket.2.html
https://github.com/torvalds/linux/blob/master/include/linux/socket.h
https://github.com/NetworkConfiguration/dhcpcd/blob/master/src/dhcp.c
https://man7.org/linux/man-pages/man7/capabilities.7.html
https://www.man7.org/linux/man-pages/man8/setcap.8.html