diff -urN ./openl2tp-1.8/Makefile ./openl2tp-1.8.new/Makefile
--- ./openl2tp-1.8/Makefile	2010-11-22 10:47:26.000000000 +0100
+++ ./openl2tp-1.8.new/Makefile	2015-11-29 19:07:47.095204297 +0100
@@ -13,14 +13,14 @@
 
 # Define USE_DMALLOC to enable dmalloc memory debugging
 # USE_DMALLOC=		y
-
+DESTDIR=/opt/openl2tp
 # Define to include test code. This must be defined to run the
 # regression tests
 # L2TP_TEST=		y
 
 # Define to compile in debug code. Also makes default trace flags
 # enable all messages
-# L2TP_DEBUG=		y
+L2TP_DEBUG=		y
 
 # Use asynchronous RPC requests where appropriate
 # Affects only L2TP-PPP-IPPOOL interfaces, not management interfaces.
@@ -84,7 +84,7 @@
 
 export PPPD_VERSION PPPD_SRCDIR PPPD_LIBDIR READLINE_LDFLAGS READLINE_CFLAGS
 export CROSS_COMPILE AS LD CC AR NM STRIP OBJCOPY OBJDUMP INSTALL UML_TARGET
-export DESTDIR SYS_LIBDIR
+export DESTDIR
 
 # Feature options are exported to sub-makes
 export L2TP_FEATURE_LAC_SUPPORT
diff -urN ./openl2tp-1.8/cli/cli_lib.c ./openl2tp-1.8.new/cli/cli_lib.c
--- ./openl2tp-1.8/cli/cli_lib.c	2010-11-12 13:28:47.000000000 +0100
+++ ./openl2tp-1.8.new/cli/cli_lib.c	2015-11-29 19:07:47.093204266 +0100
@@ -19,6 +19,7 @@
  *****************************************************************************/
 
 #include <stdio.h>
+#include <string.h>
 #include <asm/types.h>
 
 #include <readline/readline.h>
diff -urN ./openl2tp-1.8/l2tp_main.c ./openl2tp-1.8.new/l2tp_main.c
--- ./openl2tp-1.8/l2tp_main.c	2010-02-12 20:09:23.000000000 +0100
+++ ./openl2tp-1.8.new/l2tp_main.c	2015-11-29 19:07:47.093204266 +0100
@@ -49,8 +49,8 @@
 
 extern int l2tp_config_parse(FILE **fp);
 
-#define L2TP_PID_FILENAME	"/var/run/openl2tpd.pid"
-#define L2TP_CONFIG_FILENAME	"/etc/openl2tpd.conf"
+#define L2TP_PID_FILENAME	"/opt/openl2tp/var/run/openl2tpd.pid"
+#define L2TP_CONFIG_FILENAME	"/opt/openl2tp/etc/openl2tpd.conf"
 
 /* Patch information.
  * Each patch adds its version number to this array.
diff -urN ./openl2tp-1.8/l2tp_network.c ./openl2tp-1.8.new/l2tp_network.c
--- ./openl2tp-1.8/l2tp_network.c	2010-01-18 11:35:14.000000000 +0100
+++ ./openl2tp-1.8.new/l2tp_network.c	2015-11-29 19:07:47.093204266 +0100
@@ -296,7 +296,7 @@
 		 */
 		peer_profile = l2tp_peer_profile_find(peer_host_name);
 		if (peer_profile == NULL) {
-			peer_profile = l2tp_peer_profile_find_by_addr(from->sin_addr);
+			peer_profile = l2tp_peer_profile_find_by_addr(from->sin_addr, ipi->ipi_addr);
 			if (peer_profile == NULL) {
 				peer_profile = l2tp_peer_profile_find(L2TP_API_PEER_PROFILE_DEFAULT_PROFILE_NAME);
 			}
diff -urN ./openl2tp-1.8/l2tp_peer.c ./openl2tp-1.8.new/l2tp_peer.c
--- ./openl2tp-1.8/l2tp_peer.c	2008-05-07 22:44:20.000000000 +0200
+++ ./openl2tp-1.8.new/l2tp_peer.c	2015-11-29 19:07:47.094204282 +0100
@@ -174,7 +174,7 @@
 /* Finding a profile by address involves taking account of netmasks.
  * We find the best match (longest netmask.
  */
-struct l2tp_peer_profile *l2tp_peer_profile_find_by_addr(struct in_addr peer_addr)
+struct l2tp_peer_profile *l2tp_peer_profile_find_by_addr(struct in_addr peer_addr, struct in_addr server_addr)
 {
 	struct l2tp_peer_profile *profile;
 	struct l2tp_peer_profile *candidate = NULL;
@@ -185,17 +185,17 @@
 	L2TP_DEBUG(L2TP_FUNC, "%s: peer_addr=%s", __func__, inet_ntoa(peer_addr));
 	usl_list_for_each(walk, tmp, &l2tp_peer_profile_list) {
 		profile = usl_list_entry(walk, struct l2tp_peer_profile, list);
-		if (profile->peer_addr.sin_addr.s_addr == peer_addr.s_addr) {
+		if (profile->peer_addr.sin_addr.s_addr == server_addr.s_addr) {
 			L2TP_DEBUG(L2TP_FUNC, "%s: peer_addr=%s: profile %s is exact match", __func__, 
-				   inet_ntoa(peer_addr), profile->profile_name);
+				   inet_ntoa(server_addr), profile->profile_name);
 			return profile;
 		}
 		L2TP_DEBUG(L2TP_FUNC, "%s: profile %s has netmask %#x, netmask_len=%d", __func__, 
 			   profile->profile_name, ntohl(profile->netmask.s_addr), profile->netmask_len);
-		if ((profile->peer_addr.sin_addr.s_addr & profile->netmask.s_addr) == (peer_addr.s_addr & profile->netmask.s_addr)) {
+		if ((profile->peer_addr.sin_addr.s_addr & profile->netmask.s_addr) == (server_addr.s_addr & profile->netmask.s_addr)) {
 			if (profile->netmask_len > candidate_netmask_len) {
 				L2TP_DEBUG(L2TP_FUNC, "%s: peer_addr=%s found candidate %s, netmask_len=%d", __func__, 
-					   inet_ntoa(peer_addr), profile->profile_name, profile->netmask_len);
+					   inet_ntoa(server_addr), profile->profile_name, profile->netmask_len);
 				candidate = profile;
 				candidate_netmask_len = profile->netmask_len;
 			}
diff -urN ./openl2tp-1.8/l2tp_private.h ./openl2tp-1.8.new/l2tp_private.h
--- ./openl2tp-1.8/l2tp_private.h	2010-01-18 09:25:35.000000000 +0100
+++ ./openl2tp-1.8.new/l2tp_private.h	2015-11-29 19:07:47.094204282 +0100
@@ -738,7 +738,7 @@
 
 /* l2tp_peer.c */
 extern struct l2tp_peer *l2tp_peer_find(struct in_addr const *src, struct in_addr const *dest);
-extern struct l2tp_peer_profile *l2tp_peer_profile_find_by_addr(struct in_addr peer_addr);
+extern struct l2tp_peer_profile *l2tp_peer_profile_find_by_addr(struct in_addr peer_addr, struct in_addr server_addr);
 extern void l2tp_peer_free(struct l2tp_peer *peer);
 extern struct l2tp_peer *l2tp_peer_alloc(struct in_addr src, struct in_addr dest);
 extern void l2tp_peer_inc_use_count(struct l2tp_peer *peer);
diff -urN ./openl2tp-1.8/l2tp_tunnel.c ./openl2tp-1.8.new/l2tp_tunnel.c
--- ./openl2tp-1.8/l2tp_tunnel.c	2008-08-05 16:54:24.000000000 +0200
+++ ./openl2tp-1.8.new/l2tp_tunnel.c	2015-11-29 19:07:47.094204282 +0100
@@ -20,163 +20,9 @@
 #include "md5.h"
 #include "usl.h"
 #include "l2tp_private.h"
+#include "l2tp_tunnel.h"
 #include "hash.h"
 
-#define L2TP_TUNNEL_MAX_CONFIGID		100	/* limits the number of tunnels between the same two IP hosts */
-#define L2TP_TUNNEL_ESTABLISH_TIMEOUT		120 	/* 2 minutes */
-#define L2TP_TUNNEL_PERSIST_PEND_TIMEOUT	300	/* 5 minutes */
-#define L2TP_TUNNEL_MAX_COUNT			0 	/* unlimited */
-
-#define L2TP_TUNNEL_HASH_BITS			5
-#define L2TP_TUNNEL_HASH_SIZE			(1 << L2TP_TUNNEL_HASH_BITS)
-
-/* Each tunnel is represented by an instance of this structure. 
- * Each tunnel lives on 3 lists:-
- * list       - regular unsorted list, used when we need to do something
- *	        for all lists
- * id_hlist   - hashed by tunnel_id
- * name_hlist - hashed by name, not used if tunnel isn't given a name
- *
- * All configuration parameters are stored here, as well as status
- * information from the peer.
- */
-struct l2tp_tunnel {
-	struct usl_list_head		list;					/* unordered list of tunnels */
-	struct usl_hlist_node		id_hlist;				/* our list of tunnels hashed by id */
-	struct usl_hlist_node		name_hlist;				/* our list of tunnels hashed by name */
-	struct usl_list_head		session_list;				/* list of sessions on this tunnel */
-	struct usl_hlist_head		session_id_hlist[L2TP_TUNNEL_HASH_SIZE]; /* hashed list of sessions, hashed by id */
-	struct usl_fsm_instance 	fsmi;					/* state machine data */
-	struct l2tp_peer		*my_peer;
-	void				*setup_timer;
-	void				*cleanup_timer;
-	int				hold:1;					/* suppress context delete (for post analysis) */
-	int				up:1; 					/* debounce tunnel_up event */
-	int				down:1;					/* debounce tunnel_down event */
-	int				close_acked:1;				/* peer has acknowledged close */
-	int				sccrq_sent:1;				/* for peer collision detection */
-	int				we_can_be_lac:1;
-	int				we_can_be_lns:1;
-	int				fd_is_connected:1;
-	int				fd;					/* UDP socket fd */
-	void				*xprt;					/* transport handle */
-	/* Config data, set up by management or by profiles. Most are
-	 * derived from RFC2661. 
-	 */
-	struct {
-		uint32_t			flags;				/* remembers which fields have been set */
-		uint32_t			flags2;
-		struct sockaddr_in		local_addr;
-		struct sockaddr_in		peer_addr;
-		int				config_id;
-		int				hide_avps;
-		char				*secret;
-		int				secret_len;
-		enum l2tp_api_tunnel_auth_mode	auth_mode;
-		char				*host_name;
-		int				host_name_len;
-		int				framing_cap_sync:1;
-		int				framing_cap_async:1;
-		int				bearer_cap_digital:1;
-		int				bearer_cap_analog:1;
-		int				use_tiebreaker:1;
-		int				allow_ppp_proxy:1;
-		int				use_udp_checksums:1;
-		int				do_pmtu_discovery:1;
-		int				persist:1;			/* recreate if tunnel fails? */
-		int				mtu;
-		int				hello_timeout;
-		int				max_retries;
-		uint16_t			rx_window_size;
-		uint16_t			tx_window_size;
-		int				retry_timeout;
-		int				idle_timeout;
-		int				trace_flags;			/* controls debug trace */
-		int				max_sessions;
-		char				*peer_profile_name;
-		char				*tunnel_profile_name;
-		char				*session_profile_name;
-		char				*ppp_profile_name;
-		char				*tunnel_name;			/* assigned by operator */
-		char				*interface_name;		/* not yet used */
-	} config;
-	/* status info, not set up by management or profiles */
-	struct {
-		uint16_t			tunnel_id;			/* assigned tunnel id */
-		int				created_by_admin;
-		int				num_sessions;
-		int				use_count;			/* see _inc_use_count(), _dec_use_count() */
-		enum l2tp_api_tunnel_mode	mode;
-		int				num_establish_retries;		/* counts setup attempts */
-		struct l2tp_avp_tiebreaker	tiebreaker;
-		int				have_tiebreaker;
-		int				actual_tx_window_size;		/* negotiated with peer */
-		char				*create_time;
-	} status;
-	/* Stored info from the tunnel peer */
-	struct {
-		struct l2tp_avp_host_name		*host_name;
-		struct l2tp_avp_protocol_version	protocol_version;
-		struct l2tp_avp_tunnel_id		tunnel_id;
-		struct l2tp_avp_framing_cap		framing_cap;
-		struct l2tp_avp_bearer_cap		bearer_cap;
-		struct l2tp_avp_rx_window_size		rx_window_size;
-		struct l2tp_avp_challenge		*challenge;
-		int					challenge_len;
-		struct l2tp_avp_challenge_response	*challenge_response;
-		struct l2tp_avp_tiebreaker		tiebreaker;
-		int					have_tiebreaker;
-		struct l2tp_avp_firmware_revision	firmware_revision;
-		struct l2tp_avp_vendor_name		*vendor_name;
-		struct l2tp_avp_result_code		*result_code;
-		int					result_code_len;
-	} peer;
-	/* Temporary state, filled in by FSM actions */
-	struct l2tp_avp_challenge			*my_challenge;
-	int						my_challenge_len;
-	struct l2tp_avp_result_code			*result_code;		/* we send this info to peer when closing tunnels */
-	int						result_code_len;
-};
-
-/* Tunnel profiles are named sets of tunnel configuration
- * parameters. 
- */
-struct l2tp_tunnel_profile {
-	struct usl_list_head				list;
-	char						*profile_name;
-	uint32_t					flags;			/* remembers which fields have been set */
-	struct in_addr					our_addr;
-	struct in_addr					peer_addr;
-	uint16_t					our_udp_port;
-	uint16_t					peer_udp_port;
-	int						hide_avps;
-	char						*secret;
-	int						secret_len;
-	enum l2tp_api_tunnel_auth_mode			auth_mode;
-	char						*host_name;
-	int						host_name_len;
-	int						framing_cap_sync:1;
-	int						framing_cap_async:1;
-	int						bearer_cap_digital:1;
-	int						bearer_cap_analog:1;
-	int						use_tiebreaker:1;
-	int						allow_ppp_proxy:1;
-	int						use_udp_checksums:1;
-	int						do_pmtu_discovery:1;
-	int						mtu;
-	int						hello_timeout;
-	int						max_retries;
-	uint16_t					rx_window_size;
-	uint16_t					tx_window_size;
-	int						retry_timeout;
-	int						idle_timeout;
-	int						trace_flags;
-	int						max_sessions;
-	char						*peer_profile_name;
-	char						*session_profile_name;
-	char						*ppp_profile_name;
-};
-
 static void l2tp_tunnel_recreate(struct l2tp_tunnel *tunnel);
 static int l2tp_tunnel_clone(struct l2tp_tunnel *tunnel, struct l2tp_api_tunnel_msg_data *result);
 static int l2tp_tunnel_param_defaults(struct l2tp_tunnel *tunnel, char *tunnel_profile_name, char *peer_profile_name);
@@ -1885,7 +1731,7 @@
 		}
 	}
 
-	profile = l2tp_peer_profile_find_by_addr(peer->if_peer_addr);
+	profile = l2tp_peer_profile_find_by_addr(peer->if_peer_addr, tunnel->my_peer->if_local_addr);
 	if (profile != NULL) {
 		result = 0;
 	}
diff -urN ./openl2tp-1.8/l2tp_tunnel.h ./openl2tp-1.8.new/l2tp_tunnel.h
--- ./openl2tp-1.8/l2tp_tunnel.h	1970-01-01 01:00:00.000000000 +0100
+++ ./openl2tp-1.8.new/l2tp_tunnel.h	2015-11-29 19:07:47.095204297 +0100
@@ -0,0 +1,156 @@
+#include "usl.h"
+
+#define L2TP_TUNNEL_MAX_CONFIGID                100     /* limits the number of tunnels between the same two IP hosts */
+#define L2TP_TUNNEL_ESTABLISH_TIMEOUT           120     /* 2 minutes */
+#define L2TP_TUNNEL_PERSIST_PEND_TIMEOUT        300     /* 5 minutes */
+#define L2TP_TUNNEL_MAX_COUNT                   0       /* unlimited */
+
+#define L2TP_TUNNEL_HASH_BITS                   5
+#define L2TP_TUNNEL_HASH_SIZE                   (1 << L2TP_TUNNEL_HASH_BITS)
+
+/* Each tunnel is represented by an instance of this structure. 
+ * Each tunnel lives on 3 lists:-
+ * list       - regular unsorted list, used when we need to do something
+ *	        for all lists
+ * id_hlist   - hashed by tunnel_id
+ * name_hlist - hashed by name, not used if tunnel isn't given a name
+ *
+ * All configuration parameters are stored here, as well as status
+ * information from the peer.
+ */
+struct l2tp_tunnel {
+	struct usl_list_head		list;					/* unordered list of tunnels */
+	struct usl_hlist_node		id_hlist;				/* our list of tunnels hashed by id */
+	struct usl_hlist_node		name_hlist;				/* our list of tunnels hashed by name */
+	struct usl_list_head		session_list;				/* list of sessions on this tunnel */
+	struct usl_hlist_head		session_id_hlist[L2TP_TUNNEL_HASH_SIZE]; /* hashed list of sessions, hashed by id */
+	struct usl_fsm_instance 	fsmi;					/* state machine data */
+	struct l2tp_peer		*my_peer;
+	void				*setup_timer;
+	void				*cleanup_timer;
+	int				hold:1;					/* suppress context delete (for post analysis) */
+	int				up:1; 					/* debounce tunnel_up event */
+	int				down:1;					/* debounce tunnel_down event */
+	int				close_acked:1;				/* peer has acknowledged close */
+	int				sccrq_sent:1;				/* for peer collision detection */
+	int				we_can_be_lac:1;
+	int				we_can_be_lns:1;
+	int				fd_is_connected:1;
+	int				fd;					/* UDP socket fd */
+	void				*xprt;					/* transport handle */
+	/* Config data, set up by management or by profiles. Most are
+  	 * derived from RFC2661. 
+  	 */
+	struct {
+		uint32_t			flags;				/* remembers which fields have been set */
+		uint32_t			flags2;
+		struct sockaddr_in		local_addr;
+		struct sockaddr_in		peer_addr;
+		int				config_id;
+		int				hide_avps;
+		char				*secret;
+		int				secret_len;
+		enum l2tp_api_tunnel_auth_mode	auth_mode;
+		char				*host_name;
+		int				host_name_len;
+		int				framing_cap_sync:1;
+		int				framing_cap_async:1;
+		int				bearer_cap_digital:1;
+		int				bearer_cap_analog:1;
+		int				use_tiebreaker:1;
+		int				allow_ppp_proxy:1;
+		int				use_udp_checksums:1;
+		int				do_pmtu_discovery:1;
+		int				persist:1;			/* recreate if tunnel fails? */
+		int				mtu;
+		int				hello_timeout;
+		int				max_retries;
+		uint16_t			rx_window_size;
+		uint16_t			tx_window_size;
+		int				retry_timeout;
+		int				idle_timeout;
+		int				trace_flags;			/* controls debug trace */
+		int				max_sessions;
+		char				*peer_profile_name;
+		char				*tunnel_profile_name;
+		char				*session_profile_name;
+		char				*ppp_profile_name;
+		char				*tunnel_name;			/* assigned by operator */
+		char				*interface_name;		/* not yet used */
+	} config;
+	/* status info, not set up by management or profiles */
+	struct {
+		uint16_t			tunnel_id;			/* assigned tunnel id */
+		int				created_by_admin;
+		int				num_sessions;
+		int				use_count;			/* see _inc_use_count(), _dec_use_count() */
+		enum l2tp_api_tunnel_mode	mode;
+		int				num_establish_retries;		/* counts setup attempts */
+		struct l2tp_avp_tiebreaker	tiebreaker;
+		int				have_tiebreaker;
+		int				actual_tx_window_size;		/* negotiated with peer */
+		char				*create_time;
+	} status;
+	/* Stored info from the tunnel peer */
+	struct {
+		struct l2tp_avp_host_name		*host_name;
+		struct l2tp_avp_protocol_version	protocol_version;
+		struct l2tp_avp_tunnel_id		tunnel_id;
+		struct l2tp_avp_framing_cap		framing_cap;
+		struct l2tp_avp_bearer_cap		bearer_cap;
+		struct l2tp_avp_rx_window_size		rx_window_size;
+		struct l2tp_avp_challenge		*challenge;
+		int					challenge_len;
+		struct l2tp_avp_challenge_response	*challenge_response;
+		struct l2tp_avp_tiebreaker		tiebreaker;
+		int					have_tiebreaker;
+		struct l2tp_avp_firmware_revision	firmware_revision;
+		struct l2tp_avp_vendor_name		*vendor_name;
+		struct l2tp_avp_result_code		*result_code;
+		int					result_code_len;
+	} peer;
+	/* Temporary state, filled in by FSM actions */
+	struct l2tp_avp_challenge			*my_challenge;
+	int						my_challenge_len;
+	struct l2tp_avp_result_code			*result_code;		/* we send this info to peer when closing tunnels */
+	int						result_code_len;
+};
+
+/* Tunnel profiles are named sets of tunnel configuration
+ *  * parameters. 
+ *   */
+struct l2tp_tunnel_profile {
+	struct usl_list_head				list;
+	char						*profile_name;
+	uint32_t					flags;			/* remembers which fields have been set */
+	struct in_addr					our_addr;
+	struct in_addr					peer_addr;
+	uint16_t					our_udp_port;
+	uint16_t					peer_udp_port;
+	int						hide_avps;
+	char						*secret;
+	int						secret_len;
+	enum l2tp_api_tunnel_auth_mode			auth_mode;
+	char						*host_name;
+	int						host_name_len;
+	int						framing_cap_sync:1;
+	int						framing_cap_async:1;
+	int						bearer_cap_digital:1;
+	int						bearer_cap_analog:1;
+	int						use_tiebreaker:1;
+	int						allow_ppp_proxy:1;
+	int						use_udp_checksums:1;
+	int						do_pmtu_discovery:1;
+	int						mtu;
+	int						hello_timeout;
+	int						max_retries;
+	uint16_t					rx_window_size;
+	uint16_t					tx_window_size;
+	int						retry_timeout;
+	int						idle_timeout;
+	int						trace_flags;
+	int						max_sessions;
+	char						*peer_profile_name;
+	char						*session_profile_name;
+	char						*ppp_profile_name;
+};
diff -urN ./openl2tp-1.8/plugins/ipsec.c ./openl2tp-1.8.new/plugins/ipsec.c
--- ./openl2tp-1.8/plugins/ipsec.c	2010-01-18 10:00:08.000000000 +0100
+++ ./openl2tp-1.8.new/plugins/ipsec.c	2015-11-29 19:07:47.095204297 +0100
@@ -30,6 +30,7 @@
 
 #include "usl.h"
 #include "l2tp_private.h"
+#include "l2tp_tunnel.h"
 
 #define IPSEC_SETKEY_CMD	"/sbin/setkey"
 #define IPSEC_SETKEY_FILE	"/tmp/openl2tpd-tmp"
@@ -262,6 +263,7 @@
 static void ipsec_net_socket_connect(const struct l2tp_tunnel *tunnel, int fd, struct sockaddr_in *src, struct sockaddr_in *dest)
 {
 	int rc;
+	//src->sin_addr = tunnel->my_peer->if_local_addr;
 
 	if (old_l2tp_net_socket_connect_hook != NULL) {
 		(*old_l2tp_net_socket_connect_hook)(tunnel, fd, src, dest);
diff -urN ./openl2tp-1.8/plugins/ppp_unix.c ./openl2tp-1.8.new/plugins/ppp_unix.c
--- ./openl2tp-1.8/plugins/ppp_unix.c	2010-11-22 15:03:48.000000000 +0100
+++ ./openl2tp-1.8.new/plugins/ppp_unix.c	2015-11-29 19:09:37.530933025 +0100
@@ -32,6 +32,8 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include <ctype.h>
+#include "../l2tp_private.h"
+#include "../l2tp_tunnel.h"
 
 #ifndef aligned_u64
 /* should be defined in sys/types.h */
@@ -61,6 +63,7 @@
 #define SOL_PPPOL2TP	273
 #endif
 
+
 /* One ppp context is used per session. We bump reference counts on
  * the tunnel/session while we hold references to those data
  * structures.
@@ -197,6 +200,13 @@
 		}
 	}
 
+	argv[arg++] = "myip";
+	struct l2tp_peer *peer = ppp->tunnel->my_peer;
+	argv[arg++] = strdup(inet_ntoa(peer->if_local_addr));
+
+	argv[arg++] = "peerip";
+	argv[arg++] = strdup(inet_ntoa(ppp->tunnel->config.peer_addr.sin_addr));
+
 	if (params->flags2 & L2TP_API_PPP_PROFILE_FLAG_DNS_ADDR_1) {
 		ip.s_addr = params->dns_addr_1.s_addr;
 		strcpy(&buf[0], inet_ntoa(ip));
