Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
446
Issues
446
List
Boards
Labels
Service Desk
Milestones
Merge Requests
72
Merge Requests
72
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
Kea
Commits
52a259cd
Commit
52a259cd
authored
Apr 11, 2020
by
Francis Dupont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[
#1043
] Added eth1961 fake interface
parent
7bcfafaf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
4 deletions
+14
-4
src/lib/dhcp/tests/iface_mgr_test_config.cc
src/lib/dhcp/tests/iface_mgr_test_config.cc
+6
-2
src/lib/dhcp/tests/iface_mgr_test_config.h
src/lib/dhcp/tests/iface_mgr_test_config.h
+3
-0
src/lib/dhcp/tests/iface_mgr_unittest.cc
src/lib/dhcp/tests/iface_mgr_unittest.cc
+3
-0
src/lib/dhcpsrv/tests/shared_networks_list_parser_unittest.cc
...lib/dhcpsrv/tests/shared_networks_list_parser_unittest.cc
+2
-2
No files found.
src/lib/dhcp/tests/iface_mgr_test_config.cc
View file @
52a259cd
// Copyright (C) 2014-20
18
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2014-20
20
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -32,7 +32,7 @@ IfaceMgrTestConfig::IfaceMgrTestConfig(const bool default_config) {
IfaceMgr
::
instance
().
setPacketFilter
(
packet_filter4_
);
IfaceMgr
::
instance
().
setPacketFilter
(
packet_filter6_
);
// Create default set of fake interfaces: lo, eth0
and eth
1.
// Create default set of fake interfaces: lo, eth0
, eth1 and eth196
1.
if
(
default_config
)
{
createIfaces
();
}
...
...
@@ -117,6 +117,10 @@ IfaceMgrTestConfig::createIfaces() {
addAddress
(
"eth1"
,
IOAddress
(
"192.0.2.3"
));
addAddress
(
"eth1"
,
IOAddress
(
"192.0.2.5"
));
addAddress
(
"eth1"
,
IOAddress
(
"fe80::3a60:77ff:fed5:abcd"
));
// eth1961
addIface
(
"eth1961"
,
3
);
addAddress
(
"eth1961"
,
IOAddress
(
"198.51.100.1"
));
addAddress
(
"eth1961"
,
IOAddress
(
"fe80::3a60:77ff:fed5:9876"
));
}
...
...
src/lib/dhcp/tests/iface_mgr_test_config.h
View file @
52a259cd
...
...
@@ -130,6 +130,9 @@ struct FlagInactive6 {
/// - eth1 #2
/// - 192.0.2.3
/// - fe80::3a60:77ff:fed5:abcd
/// - eth1961
/// - 198.51.100.1
/// - fe80::3a60:77ff:fed5:9876
///
/// For all interfaces the following flags are set:
/// - multicast
...
...
src/lib/dhcp/tests/iface_mgr_unittest.cc
View file @
52a259cd
...
...
@@ -1869,6 +1869,9 @@ TEST_F(IfaceMgrTest, openSockets4IfaceDown) {
// and active.
EXPECT_EQ
(
2
,
IfaceMgr
::
instance
().
getIface
(
"eth1"
)
->
getSockets
().
size
());
EXPECT_EQ
(
2
,
IfaceMgr
::
instance
().
getIface
(
ETH1_INDEX
)
->
getSockets
().
size
());
// Same for eth1961.
EXPECT_EQ
(
1
,
IfaceMgr
::
instance
().
getIface
(
"eth1961"
)
->
getSockets
().
size
());
EXPECT_EQ
(
1
,
IfaceMgr
::
instance
().
getIface
(
ETH1961_INDEX
)
->
getSockets
().
size
());
// Never open socket on loopback interface.
EXPECT_TRUE
(
IfaceMgr
::
instance
().
getIface
(
"lo"
)
->
getSockets
().
empty
());
EXPECT_TRUE
(
IfaceMgr
::
instance
().
getIface
(
LO_INDEX
)
->
getSockets
().
empty
());
...
...
src/lib/dhcpsrv/tests/shared_networks_list_parser_unittest.cc
View file @
52a259cd
// Copyright (C) 2017-20
19
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2017-20
20
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -89,7 +89,7 @@ TEST(SharedNetworkListParserTest, iface) {
std
::
string
config
=
"["
" {"
"
\"
name
\"
:
\"
bird
\"
,"
"
\"
interface
\"
:
\"
eth
0
\"
"
"
\"
interface
\"
:
\"
eth
1961
\"
"
" }"
"]"
;
...
...
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