|
OpenVPN
|
#include "syshead.h"#include "multi.h"#include <inttypes.h>#include "forward.h"#include "memdbg.h"#include "ssl_pkt.h"
Go to the source code of this file.
Functions | |
| static void | send_hmac_reset_packet (struct multi_context *m, struct tls_pre_decrypt_state *state, struct tls_auth_standalone *tas, struct session_id *sid, bool request_resend_wkc, struct link_socket *sock) |
| static bool | do_pre_decrypt_check (struct multi_context *m, struct tls_pre_decrypt_state *state, struct mroute_addr addr, struct link_socket *sock) |
| static struct multi_instance * | handle_connection_attempt (struct multi_context *m, struct link_socket *sock, struct mroute_addr *real, const uint64_t hv, struct hash_bucket *bucket) |
| Handles a packet if no existing session exists for this incoming packet. | |
| struct multi_instance * | multi_get_create_instance_udp (struct multi_context *m, bool *floated, struct link_socket *sock) |
| Get a client instance based on real address. | |
| static void | multi_process_outgoing_link (struct multi_context *m, const unsigned int mpp_flags) |
| void | multi_process_io_udp (struct multi_context *m, struct link_socket *sock, unsigned int rwflags) |
|
static |
Definition at line 79 of file mudp.c.
References ASSERT, BPTR, context_2::buf, buf_advance(), context::c2, calculate_session_id_hmac(), check_session_hmac_and_pkt_id(), CO_FORCE_TLSCRYPTV2_COOKIE, D_MULTI_DEBUG, D_MULTI_MEDIUM, link_socket_actual::dest, EARLY_NEG_MASK, EARLY_NEG_START, crypto_options::flags, context_2::from, gc, gc_free(), gc_new(), options::handshake_window, multi_context::initial_rate_limiter, buffer::len, msg, tls_wrap_ctx::opt, context::options, P_OPCODE_SHIFT, packet_id_read(), packet_opcode_name(), tls_pre_decrypt_state::peer_session_id, print_link_socket_actual(), reflect_filter_rate_limit_check(), send_hmac_reset_packet(), context_2::session_id_hmac, SID_SIZE, context_2::tls_auth_standalone, tls_pre_decrypt_lite(), tls_auth_standalone::tls_wrap, multi_context::top, VERDICT_VALID_ACK_V1, VERDICT_VALID_CONTROL_V1, VERDICT_VALID_RESET_V2, VERDICT_VALID_RESET_V3, and VERDICT_VALID_WKC_V1.
Referenced by handle_connection_attempt().
|
static |
Handles a packet if no existing session exists for this incoming packet.
It will either send a reply with a hmac cookie if this is the first packet of a three-way handshake or create a multi_instance if it is a packet that completes the three-way handshake.
Definition at line 205 of file mudp.c.
References context::c2, multi_instance::context, D_MULTI_ERRORS, multi_context::deferred_shutdown_signal, multi_instance::did_real_hash, do_pre_decrypt_check(), free_tls_pre_decrypt_state(), frequency_limit_event_allowed(), context_2::from, gc, gc_free(), gc_new(), multi_context::hash, hash_add_fast(), multi_context::initial_rate_limiter, mroute_addr_print(), msg, multi_assign_peer_id(), multi_create_instance(), tls_multi::n_sessions, multi_context::new_connection_limiter, tls_pre_decrypt_state::peer_session_id, multi_instance::real, reflect_filter_rate_limit_decrease(), tls_pre_decrypt_state::server_session_id, tls_multi::session, session_id_defined(), session_skip_to_pre_start(), deferred_signal_schedule_entry::signal_received, context_2::tls_multi, TM_INITIAL, and multi_context::top.
Referenced by multi_get_create_instance_udp().
| void multi_process_io_udp | ( | struct multi_context * | m, |
| struct link_socket * | sock, | ||
| unsigned int | rwflags | ||
| ) |
Definition at line 365 of file mudp.c.
References IS_SIG, MPP_CLOSE_ON_SIGNAL, MPP_PRE_SELECT, multi_process_incoming_link(), multi_process_outgoing_link(), read_incoming_link(), SOCKET_READ, SOCKET_WRITE, and multi_context::top.
Referenced by multi_io_process_io().
|
inlinestatic |
Definition at line 352 of file mudp.c.
References multi_process_outgoing_link_dowork(), and multi_process_outgoing_link_pre().
Referenced by multi_process_io_udp().
|
static |
Definition at line 41 of file mudp.c.
References ASSERT, context_buffers::aux_buf, buf_copy(), buf_init, context_2::buffers, context::c2, D_MULTI_DEBUG, context_2::from, packet_id_rec::initialized, buffer::len, msg, msg_set_prefix(), buffer::offset, tls_wrap_ctx::opt, P_CONTROL_HARD_RESET_SERVER_V2, P_OPCODE_SHIFT, crypto_options::packet_id, tls_pre_decrypt_state::peer_session_id, process_outgoing_link(), packet_id::rec, reset_packet_id_send(), packet_id::send, tls_reset_standalone(), tls_pre_decrypt_state::tls_wrap_tmp, context_2::to_link, context_2::to_link_addr, and multi_context::top.
Referenced by do_pre_decrypt_check().