Use X-DTLS-MTU response from server as well as X-CSTP-MTU
authorDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 8 Jun 2012 22:47:45 +0000 (23:47 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 8 Jun 2012 22:47:45 +0000 (23:47 +0100)
commit21630e7ff234670525fdfeadc4acaac05abd0482
treef346955d386e2c462bf5bfa90e6a960790b9210a
parenta12d91b7d9a580497184bc9deeebef01e1a201c8
Use X-DTLS-MTU response from server as well as X-CSTP-MTU

Currently we take a very naïve approach: we just use the higher of the
two. Normally the DTLS MTU will be larger. Theoretically, perhaps we
ought to actually change the MTU of the interface according to whether
DTLS is currently connected or not? That seems cumbersome, and is almost
impossible if we aren't running as root.

So what *should* we do with packets which are "too big" for the CSTP
MTU, if they arrive while DTLS is down? Drop them? And try to fake an
ICMP "too big" or "fragmentation needed" response? Fragment them? Please
$DEITY no. The sanest thing to do would seem to be just to send them
down the CSTP link even though they'll end up fragmented into more than
one TCP packet.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
cstp.c