There are a number of instances throughout the code where the constant 28 is
authorMatt Caswell <matt@openssl.org>
Mon, 1 Dec 2014 23:49:47 +0000 (23:49 +0000)
committerMatt Caswell <matt@openssl.org>
Wed, 3 Dec 2014 09:34:04 +0000 (09:34 +0000)
commit59ee70e386a7625018f29da56d889637022d4649
treef08712082609f2fdd8305e418d8b71f026bb55d1
parent43e569921e24e6ca3c662b15718c4a5af57b01de
There are a number of instances throughout the code where the constant 28 is
used with no explanation. Some of this was introduced as part of RT#1929. The
value 28 is the length of the IP header (20 bytes) plus the UDP header (8
bytes). However use of this constant is incorrect because there may be
instances where a different value is needed, e.g. an IPv4 header is 20 bytes
but an IPv6 header is 40. Similarly you may not be using UDP (e.g. SCTP).
This commit introduces a new BIO_CTRL that provides the value to be used for
this mtu "overhead". It will be used by subsequent commits.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 0d3ae34df573f477b6b1aaf614d52dcdfcff5fce)

Conflicts:
crypto/bio/bss_dgram.c
crypto/bio/bio.h
crypto/bio/bss_dgram.c