[PATCH v2 3/3] tcp: Simplify handling of getsockname()