Disable IPv6 when compiling OpenWrt image

Hello! Please tell me, please, how to completely disable ipv6 when compiling the firmware?
What components should I disable in make menuconfig to completely disable the Ipv6, but at the same time keep the ability to include a fast patch in the firmware?

At the answer I ask to mean that in a network there are old manuals and and people, as a rule, answer on it.

I don't believe that you can disable IPv6 "completely" in the firmware image and many of the packages no longer have "IPv6 enable" flags.

There are perhaps a couple packages you could remove, like odhcpd6, but most are now "dual stack". At this point in time, Linux libraries generally support both IPv4 and IPv6, so there typically isn't a lot of "wasted space" in two code paths like there was many years ago.

I only see a handful of "toggles" in .config matching IPv6 (of any case). CONFIG_BUSYBOX_DEFAULT_FEATURE_IPV6=y is there, but it's nearly impossible to replace busybox without a complete reflash and really easy to mess things up trying to do so.

If you want to disable IPv6, you could add to /etc/sysctl.conf or a file in /etc/sysctl.d/


which will "turn it off" for the kernel and associated drivers. I recently ran into a program that would fail to run unless the loopback interface had its IPv6 address, so I also add


When I do this, I do it with two files in /etc/sysctl.d/, something like


so I can easily tell what I've modified.