[nanomsg] increasing the maximum socket address length

  • From: "Garrett D'Amore" <garrett@xxxxxxxxxx>
  • To: "nanomsg@xxxxxxxxxxxxx" <nanomsg@xxxxxxxxxxxxx>
  • Date: Tue, 19 Dec 2017 22:01:34 +0000

Today we have a fairly arbitrary limit on socket address lengths of 128
bytes.  This is actually pretty unfortunate, since it can be badly
constraining in some circumstances:

* DNS names can be up to 253 bytes (255 minus some encoding details per RFC
1035)
* IPC paths can live anywhere, modern filesystems support much longer path
lengths  (POSIX requires PATH_MAX at least 256).
* With websocket, URLs could have long PATH-INFO (and later query
parameters?)

I’d like to propose increasing this to at least 512 bytes.  I can’t really
see a need to go to 1K, but I’d support that too…  (One advantage for
smaller path limits is that some implementations use automatic buffers to
hold these — so you wind up with that thing on a stack.  If you have tiny
stacks — like 8K — this can be challenging.)

The other effect of changing this limit is that some older implementations
might not be able to communicate with new implementations with a longer
path limit, if they are actually using the longer limit.

I don’t see a problem with changing this — but wanted to give folks a
chance to chime in.

 - Garrett

Other related posts:

  • » [nanomsg] increasing the maximum socket address length - Garrett D'Amore