- simplify configure.in
- drop support for OpenSSL < 0.9.7 - add some missing definitions/includes
This commit is contained in:
parent
6c7172d694
commit
81f5713ab7
7 changed files with 44 additions and 55 deletions
|
@ -17,7 +17,7 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: net.c,v 1.35.4.186 2003/05/06 21:13:14 guus Exp $
|
||||
$Id: net.c,v 1.35.4.187 2003/07/06 17:15:25 guus Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -31,6 +31,7 @@
|
|||
#include <signal.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <syslog.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
@ -73,10 +74,6 @@
|
|||
|
||||
#include "system.h"
|
||||
|
||||
#ifndef HAVE_RAND_PSEUDO_BYTES
|
||||
#define RAND_pseudo_bytes RAND_bytes
|
||||
#endif
|
||||
|
||||
int do_purge = 0;
|
||||
int sighup = 0;
|
||||
int sigalrm = 0;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: net.h,v 1.9.4.58 2003/05/07 11:21:58 guus Exp $
|
||||
$Id: net.h,v 1.9.4.59 2003/07/06 17:15:25 guus Exp $
|
||||
*/
|
||||
|
||||
#ifndef __TINC_NET_H__
|
||||
|
@ -70,13 +70,19 @@ typedef short length_t;
|
|||
typedef union {
|
||||
struct sockaddr sa;
|
||||
struct sockaddr_in in;
|
||||
#ifdef HAVE_STRUCT_SOCKADDR_IN6
|
||||
struct sockaddr_in6 in6;
|
||||
#endif
|
||||
} sockaddr_t;
|
||||
|
||||
#ifdef SA_LEN
|
||||
#define SALEN(s) SA_LEN(&s)
|
||||
#else
|
||||
#ifdef HAVE_STRUCT_SOCKADDR_IN6
|
||||
#define SALEN(s) (s.sa_family==AF_INET?sizeof(struct sockaddr_in):sizeof(struct sockaddr_in6))
|
||||
#else
|
||||
#define SALEN(s) (sizeof sockaddr_in)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef struct vpn_packet_t {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: protocol_auth.c,v 1.1.4.19 2003/01/17 00:37:20 guus Exp $
|
||||
$Id: protocol_auth.c,v 1.1.4.20 2003/07/06 17:15:25 guus Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -37,10 +37,6 @@
|
|||
#include <openssl/rand.h>
|
||||
#include <openssl/evp.h>
|
||||
|
||||
#ifndef HAVE_RAND_PSEUDO_BYTES
|
||||
#define RAND_pseudo_bytes RAND_bytes
|
||||
#endif
|
||||
|
||||
#include "conf.h"
|
||||
#include "net.h"
|
||||
#include "netutl.h"
|
||||
|
|
20
src/route.c
20
src/route.c
|
@ -17,7 +17,7 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: route.c,v 1.1.2.51 2003/06/11 19:40:43 guus Exp $
|
||||
$Id: route.c,v 1.1.2.52 2003/07/06 17:15:25 guus Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -60,10 +60,24 @@
|
|||
|
||||
#include "system.h"
|
||||
|
||||
/* Missing definitions */
|
||||
|
||||
#ifndef ETHER_ADDR_LEN
|
||||
#define ETHER_ADDR_LEN 6
|
||||
#endif
|
||||
|
||||
#ifndef ICMP_DEST_UNREACH
|
||||
#define ICMP_DEST_UNREACH 3
|
||||
#endif
|
||||
|
||||
#ifndef ICMP_NET_UNKNOWN
|
||||
#define ICMP_NET_UNKNOWN 6
|
||||
#endif
|
||||
|
||||
#ifndef ICMP_NET_UNREACH
|
||||
#define ICMP_NET_UNREACH 0
|
||||
#endif
|
||||
|
||||
int routing_mode = RMODE_ROUTER;
|
||||
int priorityinheritance = 0;
|
||||
int macexpire = 600;
|
||||
|
@ -210,8 +224,8 @@ void route_ipv4_unreachable(vpn_packet_t *packet, uint8_t code)
|
|||
memcpy(&ip_dst, &hdr->ip_dst, 4);
|
||||
oldlen = packet->len - 14;
|
||||
|
||||
if(oldlen >= IP_MSS - sizeof(*hdr) - sizeof(struct icmphdr))
|
||||
oldlen = IP_MSS - sizeof(*hdr) - sizeof(struct icmphdr);
|
||||
if(oldlen >= IP_MSS - sizeof(*hdr) - sizeof(*icmp))
|
||||
oldlen = IP_MSS - sizeof(*hdr) - sizeof(*icmp);
|
||||
|
||||
/* Copy first part of original contents to ICMP message */
|
||||
|
||||
|
|
14
src/tincd.c
14
src/tincd.c
|
@ -17,7 +17,7 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: tincd.c,v 1.10.4.68 2003/06/11 19:07:56 guus Exp $
|
||||
$Id: tincd.c,v 1.10.4.69 2003/07/06 17:15:25 guus Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -395,19 +395,7 @@ int main(int argc, char **argv, char **envp)
|
|||
|
||||
RAND_load_file("/dev/urandom", 1024);
|
||||
|
||||
#ifdef HAVE_OPENSSL_ADD_ALL_ALGORITHMS_NOCONF
|
||||
OPENSSL_add_all_algorithms_noconf();
|
||||
#else
|
||||
#ifdef HAVE_OPENSSL_ADD_ALL_ALGORITHMS
|
||||
OpenSSL_add_all_algorithms();
|
||||
#else
|
||||
#ifdef HAVE_SSLEAY_ADD_ALL_ALGORITHMS
|
||||
SSLeay_add_all_algorithms();
|
||||
#else
|
||||
#error No add_all_algorithms function available!
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if(generate_keys) {
|
||||
read_server_config();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue