Bug 1353605: Raise correct exception upon ip address exhaustion

Change-Id: I1f30da3f3abd38348e9d2f50ea50aae1b43d6e87
(cherry picked from commit 316666311f31238c354412fc727a5950890a1c1a)
Merge "Bug 1353605: Raise correct exception upon ip address exhaustion"