Backport PortRange extensions

Fixes a compilation error.

Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Patch: http://rb.dcache.org/r/6588/
(cherry picked from commit dfa9c1207ea5a24a1e9b52690e6aceda8fd2d8c2)