Update the manpage as well, and some whitespace to make its source more legible.
[tinc] / src / net_socket.c
index 2ed685d..f7781bc 100644 (file)
@@ -1,7 +1,7 @@
 /*
     net_socket.c -- Handle various kinds of sockets.
     Copyright (C) 1998-2005 Ivo Timmermans,
-                  2000-2007 Guus Sliepen <guus@tinc-vpn.org>
+                  2000-2008 Guus Sliepen <guus@tinc-vpn.org>
 
     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
@@ -195,7 +195,7 @@ int setup_vpn_in_socket(const sockaddr_t *sa)
        {
                bool choice;
 
-               if(get_config_bool(lookup_config(myself->connection->config_tree, "PMTUDiscovery"), &choice) && choice) {
+               if(!get_config_bool(lookup_config(myself->connection->config_tree, "PMTUDiscovery"), &choice) || choice) {
                        option = IP_PMTUDISC_DO;
                        setsockopt(nfd, SOL_IP, IP_MTU_DISCOVER, &option, sizeof(option));
                }
@@ -206,7 +206,7 @@ int setup_vpn_in_socket(const sockaddr_t *sa)
        {
                bool choice;
 
-               if(get_config_bool(lookup_config(myself->connection->config_tree, "PMTUDiscovery"), &choice) && choice) {
+               if(!get_config_bool(lookup_config(myself->connection->config_tree, "PMTUDiscovery"), &choice) || choice) {
                        option = IPV6_PMTUDISC_DO;
                        setsockopt(nfd, SOL_IPV6, IPV6_MTU_DISCOVER, &option, sizeof(option));
                }