From ca668a5a5faf412e45614b2a588f940ff932c3c3 Mon Sep 17 00:00:00 2001 From: Peter Zotov Date: Tue, 15 Feb 2011 19:47:57 +0300 Subject: [PATCH] Bind to localhost. --- src/gdb-server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gdb-server.c b/src/gdb-server.c index 61729b8..ad38c64 100644 --- a/src/gdb-server.c +++ b/src/gdb-server.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "gdb-remote.h" #include "stlink-hw.h" @@ -57,7 +58,7 @@ int serve(struct stlink* sl, int port) { struct sockaddr_in serv_addr = {0}; serv_addr.sin_family = AF_INET; - serv_addr.sin_addr.s_addr = INADDR_ANY; + serv_addr.sin_addr.s_addr = inet_addr("127.0.0.1"); serv_addr.sin_port = htons(port); if(bind(sock, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) {