Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 1bee760

Browse files
committed
ncoCheckPeerHost: drive by the "disable-peer-host-check" CLI option
1 parent 2bf603c commit 1bee760

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/exec/Main.hs

+8
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,13 @@ cliParser = ByronProxyOptions
282282
, Opt.metavar "FILEPATH"
283283
, Opt.help "Path to a YAML file containing the network policies"
284284
]
285+
ncoCheckPeerHost <-
286+
(not <$>) .
287+
Opt.switch $
288+
mconcat
289+
[ Opt.long "disable-peer-host-check"
290+
, Opt.help "DANGER: disable the peer host address consistency check. Makes your node vulnerable"
291+
]
285292
ncoExternalAddress <- Opt.optional $ CSL.externalNetworkAddressOption Nothing
286293
ncoBindAddress <- Opt.optional $ CSL.listenNetworkAddressOption Nothing
287294
pure $ CSL.NetworkConfigOpts
@@ -292,6 +299,7 @@ cliParser = ByronProxyOptions
292299
, CSL.ncoPolicies = ncoPolicies
293300
, CSL.ncoExternalAddress = ncoExternalAddress
294301
, CSL.ncoBindAddress = ncoBindAddress
302+
, CSL.ncoCheckPeerHost = ncoCheckPeerHost
295303
}
296304

297305
dashconcat :: [String] -> String

0 commit comments

Comments
 (0)