0

I don't have support for IPv6 on my system, and I am only using IPv4. My wpa_supplicant logs are flooded with following error messages:

wpa_supplicant[3370]:  nl80211: Failed to open /proc/sys/net/ipv6/conf/wlan0/drop_unicast_in_l2_multicast: No such file or directory
wpa_supplicant[3370]:  nl80211: Failed to set IPv6 unicast in multicast filter

which in itself would be harmless, but makes it difficult to actually find other useful messages.

How can I tell wpa_supplicant to only use IPv4 and not try to configure IPv6?

2 Answers 2

2

As I mentioned in your other post, disabling IPv6 support is not possible in wpa_supplicant. If your only goal is to stop wpa_supplicant from logging the two errors mentioned in your question, just clone the source code and modify this function by commenting out the lines that set IPv6 params.

// comment out these lines in nl80211_configure_data_frame_filters(...)

static int nl80211_configure_data_frame_filters(void *priv, u32 filter_flags)
{
    struct i802_bss *bss = priv;
    char path[128];
    int ret;

    /* P2P-Device has no netdev that can (or should) be configured here */
    if (nl80211_get_ifmode(bss) == NL80211_IFTYPE_P2P_DEVICE)
        return 0;

    wpa_printf(MSG_DEBUG, "nl80211: Data frame filter flags=0x%x",
           filter_flags);

    /* Configure filtering of unicast frame encrypted using GTK */
    ret = os_snprintf(path, sizeof(path),
              "/proc/sys/net/ipv4/conf/%s/drop_unicast_in_l2_multicast",
              bss->ifname);
    if (os_snprintf_error(sizeof(path), ret))
        return -1;

    ret = nl80211_write_to_file(path,
                    !!(filter_flags &
                       WPA_DATA_FRAME_FILTER_FLAG_GTK));
    if (ret) {
        wpa_printf(MSG_ERROR,
               "nl80211: Failed to set IPv4 unicast in multicast filter");
        return ret;
    }

/** THIS BLOCK
    os_snprintf(path, sizeof(path),
            "/proc/sys/net/ipv6/conf/%s/drop_unicast_in_l2_multicast",
            bss->ifname);
    ret = nl80211_write_to_file(path,
                    !!(filter_flags &
                       WPA_DATA_FRAME_FILTER_FLAG_GTK));

    if (ret) {
        wpa_printf(MSG_ERROR,
               "nl80211: Failed to set IPv6 unicast in multicast filter");
        return ret;
    }
**/

    /* Configure filtering of unicast frame encrypted using GTK */
    os_snprintf(path, sizeof(path),
            "/proc/sys/net/ipv4/conf/%s/drop_gratuitous_arp",
            bss->ifname);
    ret = nl80211_write_to_file(path,
                    !!(filter_flags &
                       WPA_DATA_FRAME_FILTER_FLAG_ARP));
    if (ret) {
        wpa_printf(MSG_ERROR,
               "nl80211: Failed set gratuitous ARP filter");
        return ret;
    }

    /* Configure filtering of IPv6 NA frames */
/** THIS BLOCK
    os_snprintf(path, sizeof(path),
            "/proc/sys/net/ipv6/conf/%s/drop_unsolicited_na",
            bss->ifname);
    ret = nl80211_write_to_file(path,
                    !!(filter_flags &
                       WPA_DATA_FRAME_FILTER_FLAG_NA));
    if (ret) {
        wpa_printf(MSG_ERROR,
               "nl80211: Failed to set unsolicited NA filter");
        return ret;
    }
**/

    return 0;
}

But really what you should do is send an email to the folks at Hostap ([email protected]) and explain that you do not support IPv6, and wpa_supplicant is spamming your logs and you'd like it to stop. I'll be honest, the maintainers are pretty hit or miss on answering questions, so make sure that you ask your question clearly, and give all the information they need to make an assessment.

2

wpa_supplicant has no options to disable IPv6 support at runtime. You'll need to recompile it. I've checked version 2.9 source code.

1
  • can you please sugget what to change to disable ipv6 during compilation? Preferably, I would like to recompile the debian package. I got the source with apt-get source wpasupplicant. What do I have to change before I do dpkg-buildpackage ? Commented Jul 19, 2021 at 12:42

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.