 Upstream-Status: Inappropiate [Configuration]
 ---
  base.c     |  6 ++++++
- dnsu2t.c   | 13 +++++++++++--
+ dnsu2t.c   | 20 +++++++++++++++++---
  redsocks.c | 13 ++++++++++++-
- 3 files changed, 29 insertions(+), 3 deletions(-)
+ 3 files changed, 35 insertions(+), 4 deletions(-)
 
 diff --git a/base.c b/base.c
 index 210ddb5..9acf365 100644

 	instance->config.relayaddr.sin_family = AF_INET;
 	instance->config.relayaddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
 	/* Default value can be checked in run-time, but I doubt anyone needs that.
@@ -164,6 +165,16 @@ static int redsocks_onexit(parser_section *section)
 	 */
 	redsocks_instance *instance = section->data;

+	//Force some values that the OS depends on
+	if (instance->config.bindaddr.sin_addr.s_addr != inet_addr("10.114.103.1")) {
+		log_error(LOG_WARNING, "Overwriting `redsocks:local_ip` entry: it needs to match OS' iptables configuration.\n");
+		instance->config.bindaddr.sin_addr.s_addr = inet_addr("10.114.103.1");
+	}
+	if (instance->config.bindaddr.sin_port != 12345) {
+		log_error(LOG_WARNING, "Overwriting `redsocks:local_port` entry: it needs to match OS' iptables configuration.\n");
+		instance->config.bindaddr.sin_port = 12345;
+	}
+
 	section->data = NULL;
 	for (parser_entry *entry = &section->entries[0]; entry->key; entry++)
 		entry->addr = NULL;
--
2.7.4


 		parser_error(section->context, "`max_accept_backoff` must be positive, 0 ms is too low");
 		return -1;
diff --git a/dnsu2t.c b/dnsu2t.c
index bae4a45..6b02d1c 100644
--- a/dnsu2t.c
+++ b/dnsu2t.c
@@ -336,10 +336,10 @@ static int dnsu2t_onenter(parser_section *section)

 	INIT_LIST_HEAD(&instance->list);
 	instance->config.bindaddr.sin_family = AF_INET;
