56 0x28, 0x7f, 0x34, 0x6b, 0xd4, 0xef, 0x7a, 0x81,
57 0x2d, 0x56, 0xb8, 0xd3, 0xaf, 0xc5, 0x45, 0x9c
158 "NOTE: failed to obtain options consistency info from peer -- "
159 "this could occur if the remote peer is running a version of "
161 " before 1.5-beta8 or if there is a network connectivity problem, and will not necessarily prevent "
164 " bytes authenticated data channel traffic) -- you can disable the options consistency "
165 "check with --disable-occ.",
193 "NOTE: Beginning empirical MTU test -- results should be available in 3 to 4 minutes.");
209 "NOTE: failed to empirically measure MTU (requires " PACKAGE_NAME
" 1.5 or higher at other end of connection).");
302 size_t proto_hdr, payload_hdr;
317 while (need_to_add > 0)
332 (
int)
sizeof(uint8_t),
411 msg(
M_INFO,
"NOTE: Empirical MTU test completed [Tried,Actual] local->remote=[%d,%d] remote->local=[%d,%d]",
422 msg(
M_INFO,
"NOTE: This connection is unable to accommodate a UDP packet size of %d. Consider using --fragment or --mssfix options as a workaround.",
static bool buf_write_u16(struct buffer *dest, uint16_t data)
static int buf_read_u16(struct buffer *buf)
static bool buf_safe(const struct buffer *buf, size_t len)
static bool buf_advance(struct buffer *buf, int size)
static bool buf_write(struct buffer *dest, const void *src, size_t size)
static bool buf_write_u8(struct buffer *dest, uint8_t data)
static int buf_read_u8(struct buffer *buf)
#define buf_init(buf, offset)
long int get_random(void)
Interface functions to the internal and external multiplexers.
static bool connection_established(struct context *c)
void encrypt_sign(struct context *c, bool comp_frag)
Process a data channel packet that will be sent through a VPN tunnel.
static int min_int(int x, int y)
static void event_timeout_reset(struct event_timeout *et)
Resets a timer.
static void event_timeout_clear(struct event_timeout *et)
Clears the timeout and reset all values to 0.
size_t frame_calculate_payload_size(const struct frame *frame, const struct options *options, const struct key_type *kt)
Calculates the size of the payload according to tun-mtu and tap overhead.
size_t frame_calculate_protocol_header_size(const struct key_type *kt, const struct options *options, bool occ)
Calculates the size of the OpenVPN protocol header.
size_t frame_calculate_payload_overhead(size_t extra_tun, const struct options *options, const struct key_type *kt)
Calculates the size of the payload overhead according to tun-mtu and tap overhead.
void process_received_occ_msg(struct context *c)
void check_send_occ_req_dowork(struct context *c)
void check_send_occ_msg_dowork(struct context *c)
const uint8_t occ_magic[]
void check_send_occ_load_test_dowork(struct context *c)
static const struct mtu_load_test mtu_load_test_sequence[]
#define OCC_MTU_LOAD_REQUEST
bool options_cmp_equal_safe(char *actual, const char *expected, size_t actual_n)
void options_warning_safe(char *actual, const char *expected, size_t actual_n)
void register_signal(struct signal_info *si, int signum, const char *signal_text)
Register a soft signal in the signal_info struct si respecting priority.
static bool proto_is_dgram(int proto)
Return if the protocol is datagram (UDP)
int len
Length in bytes of the actual content within the allocated memory.
counter_type link_read_bytes
char * options_string_local
struct event_timeout occ_mtu_load_test_interval
char * options_string_remote
struct event_timeout occ_interval
counter_type link_read_bytes_auth
struct context_buffers * buffers
Contains all state information for one tunnel.
struct signal_info * sig
Internal error signaling object.
struct context_2 c2
Level 2 context.
struct options options
Options loaded from command line or configuration file.
struct context_1 c1
Level 1 context.
int payload_size
the maximum size that a payload that our buffers can hold from either tun device or network link.
int headroom
the headroom in the buffer, this is choosen to allow all potential header to be added before the pack...
struct connection_entry ce