chiark / gitweb /
noip.c (fixup_client_socket): Reorder the preflight checks.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 6 Jun 2018 19:25:51 +0000 (20:25 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 6 Jun 2018 19:25:51 +0000 (20:25 +0100)
commit7d7cba35a86cfd06ab9e3f86c6805d9bd0c34fca
tree8cc6702d65aa36297205d358f1ed9885b050cb97
parent6e1fe695843e716e8e9ab66f56383296883c3a20
noip.c (fixup_client_socket): Reorder the preflight checks.

Superficially, it looks as if `acl_allows_p' will be cheaper than
`real_getsockname'.  But actually, if `acl_allows_p' passes the remote
address then we'll end up doing a `real_getsockname' anyway in order to
decide whether we need to substitute an unfaked socket, so this is a
false economy.

This shouldn't actually change the effective behaviour, but it will
improve performance -- not that this hack is especially performance
critical.
noip.c