Better name, show probed MTU in dump.
This commit is contained in:
parent
af490a745d
commit
6d41b429a2
7 changed files with 17 additions and 17 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: connection.h,v 1.1.2.39 2003/12/20 19:47:52 guus Exp $
|
||||
$Id: connection.h,v 1.1.2.40 2003/12/20 21:25:17 guus Exp $
|
||||
*/
|
||||
|
||||
#ifndef __TINC_CONNECTION_H__
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
#define OPTION_INDIRECT 0x0001
|
||||
#define OPTION_TCPONLY 0x0002
|
||||
#define OPTION_DONTFRAGMENT 0x0004
|
||||
#define OPTION_PMTU_DISCOVERY 0x0004
|
||||
|
||||
typedef struct connection_status_t {
|
||||
int pinged:1; /* sent ping */
|
||||
|
|
|
@ -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: graph.c,v 1.1.2.32 2003/12/20 21:09:33 guus Exp $
|
||||
$Id: graph.c,v 1.1.2.33 2003/12/20 21:25:17 guus Exp $
|
||||
*/
|
||||
|
||||
/* We need to generate two trees from the graph:
|
||||
|
@ -230,7 +230,7 @@ void sssp_bfs(void)
|
|||
e->to->hostname = sockaddr2hostname(&e->to->address);
|
||||
avl_insert_node(node_udp_tree, node);
|
||||
|
||||
if(e->to->options & OPTION_DONTFRAGMENT) {
|
||||
if(e->to->options & OPTION_PMTU_DISCOVERY) {
|
||||
e->to->mtu = MTU;
|
||||
e->to->mtuprobes = 0;
|
||||
e->to->probedmtu = 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_setup.c,v 1.1.2.49 2003/12/20 21:09:33 guus Exp $
|
||||
$Id: net_setup.c,v 1.1.2.50 2003/12/20 21:25:17 guus Exp $
|
||||
*/
|
||||
|
||||
#include "system.h"
|
||||
|
@ -285,7 +285,7 @@ bool setup_myself(void)
|
|||
myself->options |= OPTION_TCPONLY;
|
||||
|
||||
if(get_config_bool(lookup_config(myself->connection->config_tree, "PMTUDiscovery"), &choice) && choice)
|
||||
myself->options |= OPTION_DONTFRAGMENT;
|
||||
myself->options |= OPTION_PMTU_DISCOVERY;
|
||||
|
||||
if(myself->options & OPTION_TCPONLY)
|
||||
myself->options |= OPTION_INDIRECT;
|
||||
|
|
|
@ -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: node.c,v 1.1.2.29 2003/12/20 19:47:52 guus Exp $
|
||||
$Id: node.c,v 1.1.2.30 2003/12/20 21:25:17 guus Exp $
|
||||
*/
|
||||
|
||||
#include "system.h"
|
||||
|
@ -180,11 +180,11 @@ void dump_nodes(void)
|
|||
|
||||
for(node = node_tree->head; node; node = node->next) {
|
||||
n = node->data;
|
||||
logger(LOG_DEBUG, _(" %s at %s cipher %d digest %d maclength %d compression %d options %lx status %04x nexthop %s via %s"),
|
||||
logger(LOG_DEBUG, _(" %s at %s cipher %d digest %d maclength %d compression %d options %lx status %04x nexthop %s via %s probedmtu %d"),
|
||||
n->name, n->hostname, n->cipher ? n->cipher->nid : 0,
|
||||
n->digest ? n->digest->type : 0, n->maclength, n->compression,
|
||||
n->options, *(uint32_t *)&n->status, n->nexthop ? n->nexthop->name : "-",
|
||||
n->via ? n->via->name : "-");
|
||||
n->via ? n->via->name : "-", n->probedmtu);
|
||||
}
|
||||
|
||||
logger(LOG_DEBUG, _("End of nodes."));
|
||||
|
|
|
@ -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.32 2003/12/20 21:09:33 guus Exp $
|
||||
$Id: protocol_auth.c,v 1.1.4.33 2003/12/20 21:25:17 guus Exp $
|
||||
*/
|
||||
|
||||
#include "system.h"
|
||||
|
@ -476,8 +476,8 @@ bool send_ack(connection_t *c)
|
|||
if((get_config_bool(lookup_config(c->config_tree, "TCPOnly"), &choice) && choice) || myself->options & OPTION_TCPONLY)
|
||||
c->options |= OPTION_TCPONLY | OPTION_INDIRECT;
|
||||
|
||||
if((get_config_bool(lookup_config(c->config_tree, "PMTUDiscovery"), &choice) && choice) || myself->options & OPTION_DONTFRAGMENT)
|
||||
c->options |= OPTION_DONTFRAGMENT;
|
||||
if((get_config_bool(lookup_config(c->config_tree, "PMTUDiscovery"), &choice) && choice) || myself->options & OPTION_PMTU_DISCOVERY)
|
||||
c->options |= OPTION_PMTU_DISCOVERY;
|
||||
|
||||
return send_request(c, "%d %s %d %lx", ACK, myport, c->estimated_weight, c->options);
|
||||
}
|
||||
|
|
|
@ -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_key.c,v 1.1.4.25 2003/12/20 19:47:53 guus Exp $
|
||||
$Id: protocol_key.c,v 1.1.4.26 2003/12/20 21:25:17 guus Exp $
|
||||
*/
|
||||
|
||||
#include "system.h"
|
||||
|
@ -267,7 +267,7 @@ bool ans_key_h(connection_t *c)
|
|||
return false;
|
||||
}
|
||||
|
||||
if(from->options & OPTION_DONTFRAGMENT && !from->mtuprobes)
|
||||
if(from->options & OPTION_PMTU_DISCOVERY && !from->mtuprobes)
|
||||
send_mtu_probe(from);
|
||||
|
||||
flush_queue(from);
|
||||
|
|
|
@ -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.72 2003/12/20 19:47:53 guus Exp $
|
||||
$Id: route.c,v 1.1.2.73 2003/12/20 21:25:17 guus Exp $
|
||||
*/
|
||||
|
||||
#include "system.h"
|
||||
|
@ -304,7 +304,7 @@ static __inline__ void route_ipv4_unicast(node_t *source, vpn_packet_t *packet)
|
|||
if(!subnet->owner->status.reachable)
|
||||
route_ipv4_unreachable(source, packet, ICMP_DEST_UNREACH, ICMP_NET_UNREACH);
|
||||
|
||||
if(subnet->owner->options & OPTION_DONTFRAGMENT && packet->len > subnet->owner->mtu && subnet->owner != myself) {
|
||||
if(subnet->owner->options & OPTION_PMTU_DISCOVERY && packet->len > subnet->owner->mtu && subnet->owner != myself) {
|
||||
ifdebug(TRAFFIC) logger(LOG_INFO, _("Packet for %s (%s) length %d larger than MTU %d"), subnet->owner->name, subnet->owner->hostname, packet->len, subnet->owner->mtu);
|
||||
packet->len = subnet->owner->mtu;
|
||||
route_ipv4_unreachable(source, packet, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED);
|
||||
|
@ -438,7 +438,7 @@ static __inline__ void route_ipv6_unicast(node_t *source, vpn_packet_t *packet)
|
|||
if(!subnet->owner->status.reachable)
|
||||
route_ipv6_unreachable(source, packet, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_NOROUTE);
|
||||
|
||||
if(subnet->owner->options & OPTION_DONTFRAGMENT && packet->len > subnet->owner->mtu && subnet->owner != myself) {
|
||||
if(subnet->owner->options & OPTION_PMTU_DISCOVERY && packet->len > subnet->owner->mtu && subnet->owner != myself) {
|
||||
ifdebug(TRAFFIC) logger(LOG_INFO, _("Packet for %s (%s) length %d larger than MTU %d"), subnet->owner->name, subnet->owner->hostname, packet->len, subnet->owner->mtu);
|
||||
packet->len = subnet->owner->mtu;
|
||||
route_ipv6_unreachable(source, packet, ICMP6_PACKET_TOO_BIG, 0);
|
||||
|
|
Loading…
Reference in a new issue