P2p: add a warning in case of an incoming connection from an untrusted peer
This commit is contained in:
parent
6bbdf13bc5
commit
65758d08ac
@ -778,8 +778,14 @@ and authenticate pool ?point_info canceler fd point =
|
|||||||
match P2p_point_state.get connection_point_info with
|
match P2p_point_state.get connection_point_info with
|
||||||
| Requested _ -> not incoming
|
| Requested _ -> not incoming
|
||||||
| Disconnected ->
|
| Disconnected ->
|
||||||
not pool.config.private_mode
|
let unexpected =
|
||||||
|| P2p_point_state.Info.trusted connection_point_info
|
pool.config.private_mode
|
||||||
|
&& not (P2p_point_state.Info.trusted connection_point_info)
|
||||||
|
in
|
||||||
|
if unexpected then
|
||||||
|
warn "[private node] incoming connection from untrused \
|
||||||
|
peer rejected!";
|
||||||
|
not unexpected
|
||||||
| Accepted _ | Running _ -> false
|
| Accepted _ | Running _ -> false
|
||||||
end
|
end
|
||||||
in
|
in
|
||||||
|
Loading…
Reference in New Issue
Block a user