sim,python: Flip logic on loopback listeners
People are bitten by allowing external connections to gem5 runs too often (it happend to me again today). This change flips the logic so the default is to only allow localhost connections. Change-Id: If9233f5ca383721017b30b5837a26c5042d925fd Signed-off-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/36175 Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu> Reviewed-by: Ayaz Akram <yazakram@ucdavis.edu> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Jason Lowe-Power
parent
9be18aa66d
commit
370cfb078c
@@ -97,9 +97,9 @@ def parse_options():
|
||||
choices=listener_modes, default="auto",
|
||||
help="Port (e.g., gdb) listener mode (auto: Enable if running " \
|
||||
"interactively) [Default: %default]")
|
||||
option("--listener-loopback-only", action="store_true", default=False,
|
||||
help="Port listeners will only accept connections over the " \
|
||||
"loopback device")
|
||||
option("--allow-remote-connections", action="store_true", default=False,
|
||||
help="Port listeners will accept connections from anywhere (0.0.0.0). "
|
||||
"Default is only localhost.")
|
||||
option('-i', "--interactive", action="store_true", default=False,
|
||||
help="Invoke the interactive interpreter after running the script")
|
||||
option("--pdb", action="store_true", default=False,
|
||||
@@ -379,7 +379,7 @@ def main(*args):
|
||||
else:
|
||||
panic("Unhandled listener mode: %s" % options.listener_mode)
|
||||
|
||||
if options.listener_loopback_only:
|
||||
if not options.allow_remote_connections:
|
||||
m5.listenersLoopbackOnly()
|
||||
|
||||
# set debugging options
|
||||
|
||||
Reference in New Issue
Block a user