miniupnp/miniupnp — pull request #53 by razzfazz (2014-02-28 08:15:23+00:00)
Title: miniupnpd/natpmp.c: avoid hang when all external ports in use

The NAT-PMP code attempts to find a different eport if the
requested one is already in use. If all eports are in use, that
would previously cause the code to iterate through the range of
eports forever. To avoid this case, we keep track of the first
eport we attempted to use and abort the loop once we've cycled
through all possible values exactly once (which takes us back
to the initial eport).