From de1b293617823ec757a5390d60185480829f74fd Mon Sep 17 00:00:00 2001 From: Jeff Date: Sat, 30 Jul 2022 09:52:06 -0400 Subject: [PATCH] squelch warnings from sid --- llarp/net/sock_addr.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/llarp/net/sock_addr.cpp b/llarp/net/sock_addr.cpp index b0ed8f2eb1..e4ddf644ef 100644 --- a/llarp/net/sock_addr.cpp +++ b/llarp/net/sock_addr.cpp @@ -16,6 +16,12 @@ namespace llarp { return memcmp(&lh, &rh, sizeof(in6_addr)) == 0; } + + bool + operator<(const in6_addr& lh, const in6_addr& rh) + { + return memcmp(&lh, &rh, sizeof(in6_addr)) < 0; + } /// shared utility functions /// @@ -209,7 +215,8 @@ namespace llarp bool SockAddr::operator<(const SockAddr& other) const { - return (m_addr.sin6_addr.s6_addr < other.m_addr.sin6_addr.s6_addr); + return (m_addr.sin6_addr < other.m_addr.sin6_addr) + or (m_addr.sin6_port < other.m_addr.sin6_port); } bool