Honour escaped slashes in regular expressions.
[radsecproxy.git] / tcp.c
diff --git a/tcp.c b/tcp.c
index 8d55941..3b758a9 100644 (file)
--- a/tcp.c
+++ b/tcp.c
@@ -1,10 +1,6 @@
-/*
- * Copyright (C) 2008-2009 Stig Venaas <venaas@uninett.no>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- */
+/* Copyright (c) 2007-2009, UNINETT AS
+ * Copyright (c) 2012, NORDUnet A/S */
+/* See LICENSE for licensing information. */
 
 #include <signal.h>
 #include <sys/socket.h>
@@ -24,9 +20,8 @@
 #include <arpa/inet.h>
 #include <regex.h>
 #include <pthread.h>
-#include "list.h"
-#include "hostport.h"
 #include "radsecproxy.h"
+#include "hostport.h"
 
 #ifdef RADPROT_TCP
 #include "debug.h"
@@ -79,7 +74,9 @@ static char **getlistenerargs() {
 
 void tcpsetsrcres() {
     if (!srcres)
-       srcres = resolvepassiveaddrinfo(protoopts ? protoopts->sourcearg : NULL, NULL, protodefs.socktype);
+       srcres =
+            resolvepassiveaddrinfo(protoopts ? protoopts->sourcearg : NULL,
+                                   AF_UNSPEC, NULL, protodefs.socktype);
 }
 
 int tcpconnect(struct server *server, struct timeval *when, int timeout, char *text) {