Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
labs
BIRD Internet Routing Daemon
Commits
ac48e72b
Commit
ac48e72b
authored
Dec 12, 2017
by
Ondřej Zajíček
Browse files
Fix some minor issues
parent
cb5df823
Pipeline
#28368
passed with stages
in 7 minutes and 40 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lib/flowspec_test.c
View file @
ac48e72b
...
...
@@ -70,8 +70,8 @@ t_first_part(void)
net_addr_flow4
*
f
;
NET_ADDR_FLOW4_
(
f
,
ip4_build
(
10
,
0
,
0
,
1
),
24
,
((
byte
[])
{
0x00
,
0x00
,
0xab
}));
const
byte
const
*
under240
=
&
f
->
data
[
1
];
const
byte
const
*
above240
=
&
f
->
data
[
2
];
const
byte
*
under240
=
&
f
->
data
[
1
];
const
byte
*
above240
=
&
f
->
data
[
2
];
/* Case 0x00 0x00 */
bt_assert
(
flow4_first_part
(
f
)
==
NULL
);
...
...
lib/net.h
View file @
ac48e72b
...
...
@@ -358,10 +358,10 @@ static inline int net_zero_roa6(const net_addr_roa6 *a)
{
return
!
a
->
pxlen
&&
ip6_zero
(
a
->
prefix
)
&&
!
a
->
max_pxlen
&&
!
a
->
asn
;
}
static
inline
int
net_zero_flow4
(
const
net_addr_flow4
*
a
)
{
return
!
a
->
pxlen
&&
ip4_zero
(
a
->
prefix
)
&&
!
a
->
data
;
}
{
return
!
a
->
pxlen
&&
ip4_zero
(
a
->
prefix
)
&&
(
a
->
length
==
sizeof
(
net_addr_flow4
))
;
}
static
inline
int
net_zero_flow6
(
const
net_addr_flow6
*
a
)
{
return
!
a
->
pxlen
&&
ip6_zero
(
a
->
prefix
)
&&
!
a
->
data
;
}
{
return
!
a
->
pxlen
&&
ip6_zero
(
a
->
prefix
)
&&
(
a
->
length
==
sizeof
(
net_addr_flow6
))
;
}
static
inline
int
net_zero_mpls
(
const
net_addr_mpls
*
a
)
{
return
!
a
->
label
;
}
...
...
sysdep/bsd/krt-sock.Y
View file @
ac48e72b
...
...
@@ -20,8 +20,8 @@ kern_sys_item:
KERNEL TABLE expr {
if ($3 && (krt_max_tables == 1))
cf_error("Multiple kernel routing tables not supported");
if ($3
< 0 || $3
>= krt_max_tables)
cf_error("Kernel table id must be in range 0-%
d
", krt_max_tables - 1);
if ($3 >= krt_max_tables)
cf_error("Kernel table id must be in range 0-%
u
", krt_max_tables - 1);
THIS_KRT->sys.table_id = $3;
}
...
...
sysdep/bsd/krt-sock.c
View file @
ac48e72b
...
...
@@ -74,11 +74,11 @@ const int rt_default_ecmp = 0;
/* Dynamic max number of tables */
int
krt_max_tables
;
u
int
krt_max_tables
;
#ifdef KRT_USE_SYSCTL_NET_FIBS
static
int
static
u
int
krt_get_max_tables
(
void
)
{
int
fibs
;
...
...
@@ -90,7 +90,11 @@ krt_get_max_tables(void)
return
1
;
}
return
MIN
(
fibs
,
KRT_MAX_TABLES
);
/* Should not happen */
if
(
fibs
<
1
)
return
1
;
return
(
uint
)
MIN
(
fibs
,
KRT_MAX_TABLES
);
}
#else
...
...
sysdep/bsd/krt-sys.h
View file @
ac48e72b
...
...
@@ -31,7 +31,7 @@ static inline void kif_sys_copy_config(struct kif_config *d UNUSED, struct kif_c
/* Kernel routes */
extern
int
krt_max_tables
;
extern
u
int
krt_max_tables
;
struct
krt_params
{
int
table_id
;
/* Kernel table ID we sync with */
...
...
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