Skip to content
Snippets Groups Projects
Commit fc25bb3b authored by Janusz Dziedzic's avatar Janusz Dziedzic
Browse files

dbg

parent 82ea5e95
Branches
No related tags found
1 merge request!148Draft: don't add bhaul AP to the bridge
Pipeline #45693 passed
...@@ -82,13 +82,13 @@ static int func(struct nl_msg *msg, void *arg) ...@@ -82,13 +82,13 @@ static int func(struct nl_msg *msg, void *arg)
if_indextoname(ifi->ifi_index, ifname); if_indextoname(ifi->ifi_index, ifname);
//printf("ifname = %s ifindex = %d status = %s action = %s\n", printf("xxx ifname = %s ifindex = %d status = %s action = %s\n",
// ifname, ifname,
// ifi->ifi_index, ifi->ifi_index,
// !!(ifi->ifi_flags & IFF_UP) ? "up" : "down", !!(ifi->ifi_flags & IFF_UP) ? "up" : "down",
// nlh->nlmsg_type == RTM_GETLINK ? "RTM_GETLINK" : nlh->nlmsg_type == RTM_GETLINK ? "RTM_GETLINK" :
// nlh->nlmsg_type == RTM_NEWLINK ? "RTM_NEWLINK" : nlh->nlmsg_type == RTM_NEWLINK ? "RTM_NEWLINK" :
// "RTM_DELLINK"); "RTM_DELLINK");
//if (!(ifi->ifi_flags & IFF_UP)) //if (!(ifi->ifi_flags & IFF_UP))
// break; // break;
...@@ -119,13 +119,13 @@ static int func(struct nl_msg *msg, void *arg) ...@@ -119,13 +119,13 @@ static int func(struct nl_msg *msg, void *arg)
bool found = false; bool found = false;
if (br_get_iflist(bridge, &num, if_list)) { if (br_get_iflist(bridge, &num, if_list)) {
printf("Failed to check bridge affiliation\n"); printf("xxx Failed to check bridge affiliation\n");
break; break;
} }
max = (num < max) ? num : max; max = (num < max) ? num : max;
for (i = 0; i < max; i++) { for (i = 0; i < max; i++) {
if (!strncmp(ifname, if_list[i], 15)) { if (!strncmp(ifname, if_list[i], 15)) {
printf("Interface %s is already a part of bridge\n", printf("xxx Interface %s is already a part of bridge\n",
ifname); ifname);
found = true; found = true;
break; break;
...@@ -135,21 +135,25 @@ static int func(struct nl_msg *msg, void *arg) ...@@ -135,21 +135,25 @@ static int func(struct nl_msg *msg, void *arg)
break; break;
} }
printf("Adding interface %s to bridge %s!\n", ifname, printf("xxx Adding interface %s to bridge %s!\n", ifname,
bridge); bridge);
/* add wds iface to bridge */ /* add wds iface to bridge */
ret = br_addif(bridge, ifname); ret = br_addif(bridge, ifname);
if (!ret) if (!ret)
printf("Successfully added interface %s to bridge %s\n", printf("xxx Successfully added interface %s to bridge %s\n",
ifname, bridge); ifname, bridge);
else
printf("xxx br_addif failed\n");
/* bring up wds interface */ /* bring up wds interface */
//ret = if_setflags(ifname, IFF_UP); //ret = if_setflags(ifname, IFF_UP);
ret = if_updown(ifname, true); ret = if_updown(ifname, true);
if (!ret) if (!ret)
printf("Successfully brought up interface %s\n", printf("xxx Successfully brought up interface %s\n",
ifname); ifname);
else
printf("xxx ifup failed\n");
break; break;
} }
default: default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment