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
0ff8404d
Commit
0ff8404d
authored
Jun 16, 2015
by
Matthieu Boutier
Committed by
Juliusz Chroboczek
Jun 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Determine default value of has_ipv6_subtrees dynamically.
Based on the kernel version, can be overridden explicitly.
parent
6d768ba4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
7 deletions
+36
-7
babeld.c
babeld.c
+1
-0
babeld.man
babeld.man
+2
-7
kernel.c
kernel.c
+19
-0
kernel.h
kernel.h
+2
-0
kernel_netlink.c
kernel_netlink.c
+6
-0
kernel_socket.c
kernel_socket.c
+6
-0
No files found.
babeld.c
View file @
0ff8404d
...
...
@@ -123,6 +123,7 @@ main(int argc, char **argv)
parse_address
(
"ff02:0:0:0:0:0:1:6"
,
protocol_group
,
NULL
);
protocol_port
=
6696
;
change_smoothing_half_life
(
4
);
has_ipv6_subtrees
=
kernel_has_ipv6_subtrees
();
while
(
1
)
{
opt
=
getopt
(
argc
,
argv
,
"m:p:h:H:i:k:A:sruS:d:g:lwz:M:t:T:c:C:DL:I:"
);
...
...
babeld.man
View file @
0ff8404d
...
...
@@ -190,13 +190,8 @@ equivalent to the command-line option
.TP
.BR ipv6-subtrees " {" true | false }
This specifies whether to use native source-specific IPv6 forwarding
rather than multiple routing tables. The default is
.BR false ,
setting this to
.B true
is recommended on sufficiently recent
.I Linux
kernels.
rather than multiple routing tables. The default is chosen automatically
depending on the kernel version.
.TP
.BI debug " level"
This specifies the debugging level, and is equivalent to the command-line
...
...
kernel.c
View file @
0ff8404d
...
...
@@ -20,6 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#include <sys/utsname.h>
#include <sys/time.h>
#include <sys/param.h>
#include <time.h>
...
...
@@ -109,3 +110,21 @@ add_import_table(int table)
import_tables
[
import_table_count
++
]
=
table
;
return
0
;
}
int
kernel_older_than
(
const
char
*
sysname
,
int
version
,
int
sub_version
)
{
struct
utsname
un
;
int
rc
;
int
v
=
0
;
int
sub_v
=
0
;
rc
=
uname
(
&
un
);
if
(
rc
<
0
)
return
-
1
;
if
(
strcmp
(
sysname
,
un
.
sysname
)
!=
0
)
return
-
1
;
rc
=
sscanf
(
un
.
release
,
"%d.%d"
,
&
v
,
&
sub_v
);
if
(
rc
<
2
)
return
-
1
;
return
(
v
<
version
||
(
v
==
version
&&
sub_v
<
sub_version
));
}
kernel.h
View file @
0ff8404d
...
...
@@ -78,3 +78,5 @@ int kernel_addresses(char *ifname, int ifindex, int ll,
int
if_eui64
(
char
*
ifname
,
int
ifindex
,
unsigned
char
*
eui
);
int
gettime
(
struct
timeval
*
tv
);
int
read_random_bytes
(
void
*
buf
,
size_t
len
);
int
kernel_older_than
(
const
char
*
sysname
,
int
version
,
int
sub_version
);
int
kernel_has_ipv6_subtrees
(
void
);
kernel_netlink.c
View file @
0ff8404d
...
...
@@ -925,6 +925,12 @@ kernel_disambiguate(int v4)
return
!
v4
&&
has_ipv6_subtrees
;
}
int
kernel_has_ipv6_subtrees
(
void
)
{
return
(
kernel_older_than
(
"Linux"
,
3
,
11
)
==
0
);
}
int
kernel_route
(
int
operation
,
const
unsigned
char
*
dest
,
unsigned
short
plen
,
const
unsigned
char
*
src
,
unsigned
short
src_plen
,
...
...
kernel_socket.c
View file @
0ff8404d
...
...
@@ -388,6 +388,12 @@ kernel_disambiguate(int v4)
return
0
;
}
int
kernel_has_ipv6_subtrees
(
void
)
{
return
0
;
}
int
kernel_route
(
int
operation
,
const
unsigned
char
*
dest
,
unsigned
short
plen
,
const
unsigned
char
*
src
,
unsigned
short
src_plen
,
...
...
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