Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/3082

Change subject: misc: Add the --listener-loopback-only command line option.
......................................................................

misc: Add the --listener-loopback-only command line option.

This option invokes the Listener::loopbackOnly() static function which
will make the port listeners bind to the loopback device exclusively and
ignore connections on other devices. That prevents external agents like
port scanners from disrupting simulations with spurious connections.

Change-Id: I46b22165046792a6f970826c109bdbce7db25c84
---
M src/python/m5/main.py
1 file changed, 6 insertions(+), 0 deletions(-)



diff --git a/src/python/m5/main.py b/src/python/m5/main.py
index b987af4..4931430 100644
--- a/src/python/m5/main.py
+++ b/src/python/m5/main.py
@@ -85,6 +85,9 @@
         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('-i', "--interactive", action="store_true", default=False,
         help="Invoke the interactive interpreter after running the script")
     option("--pdb", action="store_true", default=False,
@@ -352,6 +355,9 @@
     else:
         panic("Unhandled listener mode: %s" % options.listener_mode)

+    if options.listener_loopback_only:
+        m5.listenersLoopbackOnly()
+
     # set debugging options
     debug.setRemoteGDBPort(options.remote_gdb_port)
     for when in options.debug_break:

--
To view, visit https://gem5-review.googlesource.com/3082
To unsubscribe, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I46b22165046792a6f970826c109bdbce7db25c84
Gerrit-Change-Number: 3082
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to