--- gvpe/src/conf.C 2003/04/08 02:00:54 1.13 +++ gvpe/src/conf.C 2003/10/16 20:35:14 1.19 @@ -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; @@ -229,8 +227,11 @@ } else if (!strcmp (var, "ip-proto")) ip_proto = atoi (val); +#if ENABLE_ICMP + //TODO: error message else if (!strcmp (var, "icmp-type")) icmp_type = atoi (val); +#endif // per config else if (!strcmp (var, "node")) @@ -440,7 +441,7 @@ printf (_("keepalive interval: %d\n"), keepalive); printf (_("interface: %s\n"), ifname); printf (_("primary rsa key: %s\n"), prikeyfile ? prikeyfile : ""); - printf (_("rsa key size: %d\n"), rsa_key ? RSA_size (rsa_key) : -1); + printf (_("rsa key size: %d\n"), rsa_key ? RSA_size (rsa_key) * 8 : -1); printf ("\n"); printf ("%4s %-17s %s %-8.8s %-10.10s %s\n",