}
#endif /* USE_COMP */
- /*
- * Adjust frame size for UDP Socks support.
- */
- if (c->options.ce.socks_proxy_server)
- {
- socks_adjust_frame_parameters(&c->c2.frame, c->options.ce.proto);
- }
-
/*
* Adjust frame size based on the --tun-mtu-extra parameter.
*/
#endif
#endif /* USE_COMP */
- /* packets with peer-id (P_DATA_V2) need 3 extra bytes in frame (on client)
- * and need link_mtu+3 bytes on socket reception (on server).
- *
- * accommodate receive path in f->extra_link, which has the side effect of
- * also increasing send buffers (BUF_SIZE() macro), which need to be
- * allocated big enough before receiving peer-id option from server.
- *
- * f->extra_frame is adjusted when peer-id option is push-received
- */
- frame_add_to_extra_link(&c->c2.frame, 3);
-
#ifdef ENABLE_FRAGMENT
/*
* Set frame parameter for fragment code. This is necessary because
buf_printf(&out, " EF:%d", frame->extra_frame);
buf_printf(&out, " EB:%d", frame->extra_buffer);
buf_printf(&out, " ET:%d", frame->extra_tun);
- buf_printf(&out, " EL:%d", frame->extra_link);
buf_printf(&out, " ]");
msg(level, "%s", out.data);
* which defaults to 0 for tun and 32
* (\c TAP_MTU_EXTRA_DEFAULT) for tap.
* */
-
- int extra_link; /**< Maximum number of bytes in excess of
- * external network interface's MTU that
- * might be read from or written to it.
- *
- * Used by peer-id (3) and
- * socks UDP (10) */
};
/* Forward declarations, to prevent includes */
frame->extra_tun += increment;
}
-static inline void
-frame_add_to_extra_link(struct frame *frame, const int increment)
-{
- frame->extra_link += increment;
-}
-
static inline void
frame_add_to_extra_buffer(struct frame *frame, const int increment)
{
#define UP_TYPE_SOCKS "SOCKS Proxy"
-void
-socks_adjust_frame_parameters(struct frame *frame, int proto)
-{
- if (proto == PROTO_UDP)
- {
- frame_add_to_extra_link(frame, 10);
- }
-}
-
struct socks_proxy_info *
socks_proxy_new(const char *server,
const char *port,
/*
* Get a 10 byte subset buffer prepended to buf --
* we expect these bytes will be here because
- * we allocated frame space in socks_adjust_frame_parameters.
+ * we always allocate space for these bytes
*/
struct buffer head = buf_sub(buf, 10, true);
char authfile[256];
};
-void socks_adjust_frame_parameters(struct frame *frame, int proto);
-
struct socks_proxy_info *socks_proxy_new(const char *server,
const char *port,
const char *authfile);
/* inherit link MTU and extra_link from data channel */
frame->link_mtu = data_channel_frame->link_mtu;
- frame->extra_link = data_channel_frame->extra_link;
/* set extra_frame */
tls_adjust_frame_parameters(frame);