Browse Source
Fix sockaddr comparison (#575)
Fix sockaddr comparison (#575)
This may fix #565 It is not recommended to compare two structs via memcmp although they have been memset to 0. Added two helper functions to compare sockaddr_storage, one for address only and the other one takes port into account. These two functions are based on Unbound version in util/net_help.c, and comform needs of shadowsocks-libev. Signed-off-by: Syrone Wong <wong.syrone@gmail.com>pull/581/head
Syrone Wong
8 years ago
committed by
Max Lv
3 changed files with 97 additions and 1 deletions
Split View
Diff Options
Write
Preview
Loading…
Cancel
Save