aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/socket_default/socket_default_socket.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2014-11-21 11:23:08 +0100
committerMartin Willi <martin@revosec.ch>2014-11-21 12:02:07 +0100
commit946cf367d4129635ea35254b33977f07335488ff (patch)
treed2ecc744df3ba8f83baa1ce1ae9211e2a6ba70dd /src/libcharon/plugins/socket_default/socket_default_socket.c
parenteaca7f2143ab4ef454227c0ed286733a0e0e1759 (diff)
downloadstrongswan-946cf367d4129635ea35254b33977f07335488ff.tar.bz2
strongswan-946cf367d4129635ea35254b33977f07335488ff.tar.xz
tun-device: Read from tun to buffer on stack to avoid over-allocation of packets
Instead of allocating MTU-sized buffers for each packet, read to a stack buffer and copy to an allocation of the actual packet size. While it requires an additional copy on non-Apple platforms, this should make allocation more efficient for small packets.
Diffstat (limited to 'src/libcharon/plugins/socket_default/socket_default_socket.c')
0 files changed, 0 insertions, 0 deletions