Project

General

Profile

Bug #306

alfred netns / Could not find transtable_global for interface bat0

Added by Jean-Jacques Sarton over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
11/01/2016
Due date:
% Done:

0%

Estimated time:

Description

Baman_adv, bactl and alfred all version 2016.4

  1. alfred -i br-client -b bat0 -u /var/run/alfred.sock
    terminate with:
    Could not find transtable_global for interface bat0. Make sure it is a valid batman-adv soft-interface

strace show that alfred the following:

open("/sys/kernel/debug//batman_adv/bat0/transtable_global", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "Could not find transtable_global"..., 103Could not find transtable_global for interface bat0. Make sure it is a valid batman-adv soft-interface
) = 103
exit_group(-1)

History

#2

Updated by Jean-Jacques Sarton over 4 years ago

I think that I have made the right corrections for this bug.

file netlink.h addedd at the end:

int batadv_interface_check_netlink(const char *mesh_iface)
{
    struct get_tq_netlink_opts opts = {
        .tq = 0,
        .found = false,
        .query_opts = {
            .err = 0,
        },
    };
    int ret = 0;

    memset(&opts.mac, 0, ETH_ALEN);

    ret = netlink_query_common(mesh_iface,  BATADV_CMD_GET_ORIGINATORS,
                       get_tq_netlink_cb, &opts.query_opts);
    if (ret < 0)
        return ret;

    memset(&opts.mac, 0, ETH_ALEN);
    ret = netlink_query_common(mesh_iface,  BATADV_CMD_GET_ORIGINATORS,
                       get_tq_netlink_cb, &opts.query_opts);

    if (ret < 0)
        return ret;
    return 0;    
}

netlink.h added:
 int batadv_interface_check_netlink(const char *mesh_iface);

bat_adv_query.c replaced

int batadv_interface_check(const char *mesh_iface)

whith:
int batadv_interface_check_debugfs(const char *mesh_iface)

Added after int batadv_interface_check_debugfs(const char *mesh_iface) {...}
int batadv_interface_check(const char *mesh_iface)
{
    int ret = 0;
    enable_net_admin_capability(1);
    ret = batadv_interface_check_netlink(mesh_iface);
    enable_net_admin_capability(0);

    if ( ret < 0 )
        return batadv_interface_check_debugfs(mesh_iface);
    return 0;
}

#3

Updated by Sven Eckelmann over 4 years ago

Please submit the full patch via the mailing list as described in Contribute

PS: batadv_interface_check_netlink looks broken to me

#4

Updated by Jean-Jacques Sarton over 4 years ago

I have sen the patch.

You are right, I had to check ORIGINATORS and TRANSTABLE_GLOBAL.

I have send the corrected part

#5

Updated by Sven Eckelmann over 4 years ago

  • Assignee changed from Jean-Jacques Sarton to Simon Wunderlich

Jean-Jacques was not fixing the problems we found in his patch. I have therefore fixed them myself and submitted it to the mailing list https://patchwork.open-mesh.org/project/b.a.t.m.a.n./patch/20161106093738.17010-1-sven@narfation.org/

The version v7 was chosen because this seemed to be the 7th submission of the patch. Jean-Jacques has not really numbered his versions very well. So I am sorry about any possible confusions.

#6

Updated by Sven Eckelmann over 4 years ago

  • Status changed from In Progress to Resolved
#7

Updated by Sven Eckelmann over 4 years ago

  • Status changed from Resolved to Closed

Fix is part of the release 2016.5

#8

Updated by Sven Eckelmann over 4 years ago

  • Target version set to 2016.5

Also available in: Atom PDF