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
8dd23d14
Commit
8dd23d14
authored
Oct 31, 2019
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Plain Diff
Merge upstream master
parents
223c72e2
0835d5d8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
12 deletions
+19
-12
CHANGES
CHANGES
+6
-0
interface.c
interface.c
+10
-9
kernel_socket.c
kernel_socket.c
+2
-2
message.c
message.c
+1
-1
No files found.
CHANGES
View file @
8dd23d14
20 August 2019: babeld-1.9.1
* Fixed a crash that could happen when unicast and RTT estimation are
both enabled on an interface. Thanks to Dave Taht.
* Fixed compilation under BSD. Thanks to Dave Taht.
4 August 2019: babeld-1.9.0
4 August 2019: babeld-1.9.0
* Reworked buffering of unicast packets to use a per-neighbour buffer
* Reworked buffering of unicast packets to use a per-neighbour buffer
...
...
interface.c
View file @
8dd23d14
...
@@ -44,6 +44,8 @@ THE SOFTWARE.
...
@@ -44,6 +44,8 @@ THE SOFTWARE.
#include "xroute.h"
#include "xroute.h"
#include "hmac.h"
#include "hmac.h"
#define MIN_MTU 512
struct
interface
*
interfaces
=
NULL
;
struct
interface
*
interfaces
=
NULL
;
static
struct
interface
*
static
struct
interface
*
...
@@ -280,12 +282,8 @@ interface_updown(struct interface *ifp, int up)
...
@@ -280,12 +282,8 @@ interface_updown(struct interface *ifp, int up)
if
((
!!
up
)
==
if_up
(
ifp
))
if
((
!!
up
)
==
if_up
(
ifp
))
return
0
;
return
0
;
if
(
up
)
ifp
->
flags
|=
IF_UP
;
else
ifp
->
flags
&=
~
IF_UP
;
if
(
up
)
{
if
(
up
)
{
ifp
->
flags
|=
IF_UP
;
if
(
ifp
->
ifindex
<=
0
)
{
if
(
ifp
->
ifindex
<=
0
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
"Upping unknown interface %s.
\n
"
,
ifp
->
name
);
"Upping unknown interface %s.
\n
"
,
ifp
->
name
);
...
@@ -307,7 +305,9 @@ interface_updown(struct interface *ifp, int up)
...
@@ -307,7 +305,9 @@ interface_updown(struct interface *ifp, int up)
mtu
=
kernel_interface_mtu
(
ifp
->
name
,
ifp
->
ifindex
);
mtu
=
kernel_interface_mtu
(
ifp
->
name
,
ifp
->
ifindex
);
if
(
mtu
<
0
)
{
if
(
mtu
<
0
)
{
fprintf
(
stderr
,
"Warning: couldn't get MTU of interface %s (%u).
\n
"
,
fprintf
(
stderr
,
"Warning: couldn't get MTU of interface %s (%u), "
"using 1280
\n
"
,
ifp
->
name
,
ifp
->
ifindex
);
ifp
->
name
,
ifp
->
ifindex
);
mtu
=
1280
;
mtu
=
1280
;
}
}
...
@@ -318,10 +318,10 @@ interface_updown(struct interface *ifp, int up)
...
@@ -318,10 +318,10 @@ interface_updown(struct interface *ifp, int up)
to reassemble up to 1500 bytes. In IPv4, every host must be
to reassemble up to 1500 bytes. In IPv4, every host must be
able to reassemble up to 576 bytes. At any rate, the Babel spec
able to reassemble up to 576 bytes. At any rate, the Babel spec
says that every node must be able to parse packets of size 512. */
says that every node must be able to parse packets of size 512. */
if
(
mtu
<
512
)
{
if
(
mtu
<
MIN_MTU
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
"Suspiciously low MTU %d on interface %s (%u), using
512
.
\n
"
,
"Suspiciously low MTU %d on interface %s (%u), using
%d
.
\n
"
,
mtu
,
ifp
->
name
,
ifp
->
ifindex
);
mtu
,
ifp
->
name
,
ifp
->
ifindex
,
MIN_MTU
);
mtu
=
512
;
mtu
=
512
;
}
}
...
@@ -498,6 +498,7 @@ interface_updown(struct interface *ifp, int up)
...
@@ -498,6 +498,7 @@ interface_updown(struct interface *ifp, int up)
send_update
(
ifp
,
0
,
NULL
,
0
,
NULL
,
0
);
send_update
(
ifp
,
0
,
NULL
,
0
,
NULL
,
0
);
send_multicast_request
(
ifp
,
NULL
,
0
,
NULL
,
0
);
send_multicast_request
(
ifp
,
NULL
,
0
,
NULL
,
0
);
}
else
{
}
else
{
ifp
->
flags
&=
~
IF_UP
;
flush_interface_routes
(
ifp
,
0
);
flush_interface_routes
(
ifp
,
0
);
ifp
->
buf
.
len
=
0
;
ifp
->
buf
.
len
=
0
;
ifp
->
buf
.
size
=
0
;
ifp
->
buf
.
size
=
0
;
...
...
kernel_socket.c
View file @
8dd23d14
...
@@ -456,11 +456,11 @@ kernel_route(int operation, int table,
...
@@ -456,11 +456,11 @@ kernel_route(int operation, int table,
/* Avoid atomic route changes that is buggy on OS X. */
/* Avoid atomic route changes that is buggy on OS X. */
kernel_route
(
ROUTE_FLUSH
,
table
,
dest
,
plen
,
kernel_route
(
ROUTE_FLUSH
,
table
,
dest
,
plen
,
src
,
src_plen
,
src
,
src_plen
,
NULL
,
gate
,
ifindex
,
metric
,
gate
,
ifindex
,
metric
,
NULL
,
0
,
0
,
0
);
NULL
,
0
,
0
,
0
);
return
kernel_route
(
ROUTE_ADD
,
table
,
dest
,
plen
,
return
kernel_route
(
ROUTE_ADD
,
table
,
dest
,
plen
,
src
,
src_plen
,
src
,
src_plen
,
NULL
,
newgate
,
newifindex
,
newmetric
,
newgate
,
newifindex
,
newmetric
,
NULL
,
0
,
0
,
0
);
NULL
,
0
,
0
,
0
);
...
...
message.c
View file @
8dd23d14
...
@@ -1218,7 +1218,7 @@ buffer_hello(struct buffered *buf, struct interface *ifp,
...
@@ -1218,7 +1218,7 @@ buffer_hello(struct buffered *buf, struct interface *ifp,
accumulate_byte
(
buf
,
4
);
accumulate_byte
(
buf
,
4
);
accumulate_int
(
buf
,
0
);
accumulate_int
(
buf
,
0
);
}
}
end_message
(
&
ifp
->
buf
,
MESSAGE_HELLO
,
timestamp
?
12
:
6
);
end_message
(
buf
,
MESSAGE_HELLO
,
timestamp
?
12
:
6
);
}
}
void
void
...
...
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