Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
map-agent
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Multi-AP
map-agent
Commits
fc25bb3b
Commit
fc25bb3b
authored
3 years ago
by
Janusz Dziedzic
Browse files
Options
Downloads
Patches
Plain Diff
dbg
parent
82ea5e95
Branches
Branches containing commit
No related tags found
1 merge request
!148
Draft: don't add bhaul AP to the bridge
Pipeline
#45693
passed
3 years ago
Stage: static_code_analysis
Stage: compile_test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/nl.c
+16
-12
16 additions, 12 deletions
src/nl.c
with
16 additions
and
12 deletions
src/nl.c
+
16
−
12
View file @
fc25bb3b
...
@@ -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:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment