Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
e4c0e82b
Commit
e4c0e82b
authored
Mar 17, 2019
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify IFA_LOCAL code in kernel_netlink.
parent
e10eadef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
kernel_netlink.c
kernel_netlink.c
+7
-4
No files found.
kernel_netlink.c
View file @
e4c0e82b
...
...
@@ -1334,13 +1334,16 @@ parse_addr_rta(struct ifaddrmsg *addr, int len, struct in6_addr *res)
struct
rtattr
*
rta
;
len
-=
NLMSG_ALIGN
(
sizeof
(
*
addr
));
rta
=
IFA_RTA
(
addr
);
int
has_local
=
0
;
/* A _LOCAL TLV may be bound with a _ADDRESS' which
represents the peer's address. In this case, ignore _ADDRESS. */
int
is_local
=
0
;
while
(
RTA_OK
(
rta
,
len
))
{
switch
(
rta
->
rta_type
)
{
case
IFA_LOCAL
:
has_local
=
1
;
/* On some point-to-point technologies, there's both _LOCAL
and _ADDRESS, and _ADDRESS is apparently the peer address
while _LOCAL is the one we want. */
is_local
=
1
;
/* fallthrough */
case
IFA_ADDRESS
:
switch
(
addr
->
ifa_family
)
{
case
AF_INET
:
...
...
@@ -1357,7 +1360,7 @@ parse_addr_rta(struct ifaddrmsg *addr, int len, struct in6_addr *res)
return
-
1
;
break
;
}
if
(
ha
s_local
)
if
(
i
s_local
)
return
0
;
break
;
default:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment