Skip to content

Commit 9ffb23b

Browse files
committed
Merge netperms_implicit_addr
2 parents 74f7c94 + 9a79815 commit 9ffb23b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/net.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,7 @@ void CConnman::AddWhitelistPermissionFlags(NetPermissionFlags& flags, const CNet
581581
if (whitelist_relay) NetPermissions::AddFlag(flags, NetPermissionFlags::Relay);
582582
NetPermissions::AddFlag(flags, NetPermissionFlags::Mempool);
583583
NetPermissions::AddFlag(flags, NetPermissionFlags::NoBan);
584+
NetPermissions::AddFlag(flags, NetPermissionFlags::Addr);
584585
}
585586
}
586587

test/functional/p2p_permissions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def run_test(self):
3333
# default permissions (no specific permissions)
3434
["-whitelist=127.0.0.1"],
3535
# Make sure the default values in the command line documentation match the ones here
36-
["relay", "noban", "mempool", "download"])
36+
["addr", "relay", "noban", "mempool", "download"])
3737

3838
self.checkpermission(
3939
# no permission (even with forcerelay)
@@ -43,14 +43,14 @@ def run_test(self):
4343
self.checkpermission(
4444
# relay permission removed (no specific permissions)
4545
["-whitelist=127.0.0.1", "-whitelistrelay=0"],
46-
["noban", "mempool", "download"])
46+
["addr", "noban", "mempool", "download"])
4747

4848
self.checkpermission(
4949
# forcerelay and relay permission added
5050
# Legacy parameter interaction which set whitelistrelay to true
5151
# if whitelistforcerelay is true
5252
["-whitelist=127.0.0.1", "-whitelistforcerelay"],
53-
["forcerelay", "relay", "noban", "mempool", "download"])
53+
["addr", "forcerelay", "relay", "noban", "mempool", "download"])
5454

5555
# Let's make sure permissions are merged correctly
5656
# For this, we need to use whitebind instead of bind

0 commit comments

Comments
 (0)