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
72c75799
Commit
72c75799
authored
Jun 13, 2019
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Plain Diff
Merge upstream master
parents
b3b6cf9b
f8bce04c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
5 deletions
+22
-5
configuration.c
configuration.c
+1
-0
kernel_netlink.c
kernel_netlink.c
+7
-4
message.c
message.c
+14
-1
No files found.
configuration.c
View file @
72c75799
...
@@ -1145,6 +1145,7 @@ parse_config_line(int c, gnc_t gnc, void *closure,
...
@@ -1145,6 +1145,7 @@ parse_config_line(int c, gnc_t gnc, void *closure,
c
=
parse_filter
(
c
,
gnc
,
closure
,
&
filter
);
c
=
parse_filter
(
c
,
gnc
,
closure
,
&
filter
);
if
(
c
<
-
1
)
if
(
c
<
-
1
)
goto
fail
;
goto
fail
;
add_filter
(
filter
,
&
install_filters
);
}
else
if
(
strcmp
(
token
,
"interface"
)
==
0
)
{
}
else
if
(
strcmp
(
token
,
"interface"
)
==
0
)
{
struct
interface_conf
*
if_conf
;
struct
interface_conf
*
if_conf
;
c
=
parse_ifconf
(
c
,
gnc
,
closure
,
&
if_conf
);
c
=
parse_ifconf
(
c
,
gnc
,
closure
,
&
if_conf
);
...
...
kernel_netlink.c
View file @
72c75799
...
@@ -1342,13 +1342,16 @@ parse_addr_rta(struct ifaddrmsg *addr, int len, struct in6_addr *res)
...
@@ -1342,13 +1342,16 @@ parse_addr_rta(struct ifaddrmsg *addr, int len, struct in6_addr *res)
struct
rtattr
*
rta
;
struct
rtattr
*
rta
;
len
-=
NLMSG_ALIGN
(
sizeof
(
*
addr
));
len
-=
NLMSG_ALIGN
(
sizeof
(
*
addr
));
rta
=
IFA_RTA
(
addr
);
rta
=
IFA_RTA
(
addr
);
int
has_local
=
0
;
/* A _LOCAL TLV may be bound with a _ADDRESS' which
int
is_local
=
0
;
represents the peer's address. In this case, ignore _ADDRESS. */
while
(
RTA_OK
(
rta
,
len
))
{
while
(
RTA_OK
(
rta
,
len
))
{
switch
(
rta
->
rta_type
)
{
switch
(
rta
->
rta_type
)
{
case
IFA_LOCAL
:
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
:
case
IFA_ADDRESS
:
switch
(
addr
->
ifa_family
)
{
switch
(
addr
->
ifa_family
)
{
case
AF_INET
:
case
AF_INET
:
...
@@ -1365,7 +1368,7 @@ parse_addr_rta(struct ifaddrmsg *addr, int len, struct in6_addr *res)
...
@@ -1365,7 +1368,7 @@ parse_addr_rta(struct ifaddrmsg *addr, int len, struct in6_addr *res)
return
-
1
;
return
-
1
;
break
;
break
;
}
}
if
(
ha
s_local
)
if
(
i
s_local
)
return
0
;
return
0
;
break
;
break
;
default:
default:
...
...
message.c
View file @
72c75799
...
@@ -139,6 +139,8 @@ parse_update_subtlv(struct interface *ifp, int metric, int ae,
...
@@ -139,6 +139,8 @@ parse_update_subtlv(struct interface *ifp, int metric, int ae,
}
}
}
}
*
src_plen
=
0
;
while
(
i
<
alen
)
{
while
(
i
<
alen
)
{
type
=
a
[
i
];
type
=
a
[
i
];
if
(
type
==
SUBTLV_PAD1
)
{
if
(
type
==
SUBTLV_PAD1
)
{
...
@@ -161,6 +163,10 @@ parse_update_subtlv(struct interface *ifp, int metric, int ae,
...
@@ -161,6 +163,10 @@ parse_update_subtlv(struct interface *ifp, int metric, int ae,
int
rc
;
int
rc
;
if
(
len
<
1
)
if
(
len
<
1
)
goto
fail
;
goto
fail
;
if
(
a
[
i
+
2
]
==
0
)
/* source prefix cannot be default */
goto
fail
;
if
(
*
src_plen
!=
0
)
/* source prefix can only be specified once */
goto
fail
;
*
src_plen
=
a
[
i
+
2
];
*
src_plen
=
a
[
i
+
2
];
rc
=
network_prefix
(
ae
,
*
src_plen
,
0
,
a
+
i
+
3
,
NULL
,
rc
=
network_prefix
(
ae
,
*
src_plen
,
0
,
a
+
i
+
3
,
NULL
,
len
-
1
,
src_prefix
);
len
-
1
,
src_prefix
);
...
@@ -300,6 +306,8 @@ parse_request_subtlv(int ae, const unsigned char *a, int alen,
...
@@ -300,6 +306,8 @@ parse_request_subtlv(int ae, const unsigned char *a, int alen,
{
{
int
type
,
len
,
i
=
0
;
int
type
,
len
,
i
=
0
;
*
src_plen
=
0
;
while
(
i
<
alen
)
{
while
(
i
<
alen
)
{
type
=
a
[
0
];
type
=
a
[
0
];
if
(
type
==
SUBTLV_PAD1
)
{
if
(
type
==
SUBTLV_PAD1
)
{
...
@@ -320,6 +328,10 @@ parse_request_subtlv(int ae, const unsigned char *a, int alen,
...
@@ -320,6 +328,10 @@ parse_request_subtlv(int ae, const unsigned char *a, int alen,
int
rc
;
int
rc
;
if
(
len
<
1
)
if
(
len
<
1
)
goto
fail
;
goto
fail
;
if
(
a
[
i
+
2
]
==
0
)
goto
fail
;
if
(
*
src_plen
!=
0
)
goto
fail
;
*
src_plen
=
a
[
i
+
2
];
*
src_plen
=
a
[
i
+
2
];
rc
=
network_prefix
(
ae
,
*
src_plen
,
0
,
a
+
i
+
3
,
NULL
,
rc
=
network_prefix
(
ae
,
*
src_plen
,
0
,
a
+
i
+
3
,
NULL
,
len
-
1
,
src_prefix
);
len
-
1
,
src_prefix
);
...
@@ -1841,7 +1853,8 @@ send_ihu(struct neighbour *neigh, struct interface *ifp)
...
@@ -1841,7 +1853,8 @@ send_ihu(struct neighbour *neigh, struct interface *ifp)
send_rtt_data
=
0
;
send_rtt_data
=
0
;
}
}
buffer_ihu
(
&
ifp
->
buf
,
ifp
,
rxcost
,
interval
,
neigh
->
address
,
buffer_ihu
((
ifp
->
flags
&
IF_UNICAST
)
!=
0
?
&
neigh
->
buf
:
&
ifp
->
buf
,
ifp
,
rxcost
,
interval
,
neigh
->
address
,
send_rtt_data
,
neigh
->
hello_send_us
,
send_rtt_data
,
neigh
->
hello_send_us
,
time_us
(
neigh
->
hello_rtt_receive_time
));
time_us
(
neigh
->
hello_rtt_receive_time
));
...
...
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