--- gvpe/src/conf.C 2003/04/13 00:35:46 1.15 +++ gvpe/src/conf.C 2003/10/16 21:57:54 1.20 @@ -1,10 +1,6 @@ /* conf.c -- configuration code - Copyright (C) 1998 Robert van der Meulen - 1998-2002 Ivo Timmermans - 2000-2002 Guus Sliepen - 2000 Cris van Pelt - 2003 Marc Lehmann + Copyright (C) 2003 Marc Lehmann This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -33,8 +29,7 @@ #include #include -#include -#include +#include "netcompat.h" #include #include @@ -104,11 +99,14 @@ { memset (this, 0, sizeof (*this)); + mtu = DEFAULT_MTU; rekey = DEFAULT_REKEY; keepalive = DEFAULT_KEEPALIVE; llevel = L_INFO; ip_proto = IPPROTO_GRE; +#if ENABLE_ICMP icmp_type = ICMP_ECHOREPLY; +#endif default_node.udp_port = DEFAULT_UDPPORT; default_node.tcp_port = DEFAULT_UDPPORT; @@ -230,7 +228,11 @@ else if (!strcmp (var, "ip-proto")) ip_proto = atoi (val); else if (!strcmp (var, "icmp-type")) - icmp_type = atoi (val); + { +#if ENABLE_ICMP + icmp_type = atoi (val); +#endif + } // per config else if (!strcmp (var, "node")) @@ -299,14 +301,24 @@ script_node_up = strdup (val); else if (!strcmp (var, "node-down")) script_node_down = strdup (val); -#if ENABLE_HTTP_PROXY else if (!strcmp (var, "http-proxy-host")) - proxy_host = strdup (val); + { +#if ENABLE_HTTP_PROXY + proxy_host = strdup (val); +#endif + } else if (!strcmp (var, "http-proxy-port")) - proxy_port = atoi (val); + { +#if ENABLE_HTTP_PROXY + proxy_port = atoi (val); +#endif + } else if (!strcmp (var, "http-proxy-auth")) - proxy_auth = (char *)base64_encode ((const u8 *)val, strlen (val)); + { +#if ENABLE_HTTP_PROXY + proxy_auth = (char *)base64_encode ((const u8 *)val, strlen (val)); #endif + } /* node-specific, non-defaultable */ else if (node != &default_node && !strcmp (var, "hostname"))