Skip to content

Commit 82aed4b

Browse files
committed
aplay/mixer: sockadr cmp: check also IPv6 scope ID
1 parent 950f3dc commit 82aed4b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/audio/playback/mixer.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
#include "audio/audio_playback.h"
5757
#include "audio/codec.h"
5858
#include "audio/types.h"
59-
#include "compat/net.h" // for sockaddr_in, sockaddr_in6, in6_addr
59+
#include "compat/net.h" // for sockaddr_in, sockaddr_in6, in6_addr...
6060
#include "debug.h"
6161
#include "host.h" // for get_commandline_param, uv_argv
6262
#include "lib_common.h"
@@ -115,6 +115,11 @@ class sockaddr_storage_less {
115115
}
116116
}
117117

118+
if (IN6_IS_ADDR_LINKLOCAL(&sin_x.sin6_addr) &&
119+
sin_x.sin6_scope_id != sin_y.sin6_scope_id) {
120+
return sin_x.sin6_scope_id < sin_y.sin6_scope_id;
121+
}
122+
118123
return sin_x.sin6_port < sin_y.sin6_port;
119124
}
120125
abort();

0 commit comments

Comments
 (0)