File tree Expand file tree Collapse file tree 5 files changed +29
-16
lines changed Expand file tree Collapse file tree 5 files changed +29
-16
lines changed Original file line number Diff line number Diff line change @@ -67,13 +67,13 @@ task:
67
67
- if [ -z "$NOHACK" ]; then cargo hack check --each-feature --target i686-unknown-freebsd; fi
68
68
before_cache_script : rm -rf $CARGO_HOME/registry/index
69
69
70
- # Test macOS x86_64 in a full VM
70
+ # Test macOS aarch64 in a full VM
71
71
task :
72
- name : macOS x86_64
72
+ name : macOS aarch64
73
73
env :
74
- TARGET : x86_64 -apple-darwin
75
- osx_instance :
76
- image : big-sur-xcode
74
+ TARGET : aarch64 -apple-darwin
75
+ macos_instance :
76
+ image : ghcr.io/cirruslabs/macos-ventura-base:latest
77
77
setup_script :
78
78
- curl --proto '=https' --tlsv1.2 -sSf -o rustup.sh https://sh.rustup.rs
79
79
- sh rustup.sh -y --profile=minimal --default-toolchain $TOOLCHAIN
@@ -235,9 +235,9 @@ task:
235
235
- name : Linux x32
236
236
env :
237
237
TARGET : x86_64-unknown-linux-gnux32
238
- - name : macOS aarch64
238
+ - name : macOS x86_64
239
239
env :
240
- TARGET : aarch64 -apple-darwin
240
+ TARGET : x86_64 -apple-darwin
241
241
- name : NetBSD x86_64
242
242
env :
243
243
TARGET : x86_64-unknown-netbsd
Original file line number Diff line number Diff line change 3
3
All notable changes to this project will be documented in this file.
4
4
This project adheres to [ Semantic Versioning] ( https://semver.org/ ) .
5
5
6
+ ## [ Unreleased] - ReleaseDate
7
+ ### Fixed
8
+ - Fix ` SockaddrIn6 ` bug that was swapping flowinfo and scope_id byte ordering.
9
+ ([ #1964 ] ( https://github.com/nix-rust/nix/pull/1964 ) )
10
+
6
11
## [ 0.26.1] - 2022-11-29
7
- ### Added
8
- ### Changed
9
12
### Fixed
10
13
- Fix UB with ` sys::socket::sockopt::SockType ` using ` SOCK_PACKET ` .
11
14
([ #1821 ] ( https://github.com/nix-rust/nix/pull/1821 ) )
12
15
13
- ### Removed
14
-
15
16
## [ 0.26.0] - 2022-11-29
16
17
### Added
17
18
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ limitations. Support for platforms is split into three tiers:
47
47
The following targets are supported by ` nix ` :
48
48
49
49
Tier 1:
50
+ * aarch64-apple-darwin
50
51
* aarch64-unknown-linux-gnu
51
52
* arm-unknown-linux-gnueabi
52
53
* armv7-unknown-linux-gnueabihf
@@ -58,13 +59,11 @@ Tier 1:
58
59
* mips64el-unknown-linux-gnuabi64
59
60
* mipsel-unknown-linux-gnu
60
61
* powerpc64le-unknown-linux-gnu
61
- * x86_64-apple-darwin
62
62
* x86_64-unknown-freebsd
63
63
* x86_64-unknown-linux-gnu
64
64
* x86_64-unknown-linux-musl
65
65
66
66
Tier 2:
67
- * aarch64-apple-darwin
68
67
* aarch64-apple-ios
69
68
* aarch64-linux-android
70
69
* arm-linux-androideabi
@@ -75,6 +74,7 @@ Tier 2:
75
74
* s390x-unknown-linux-gnu
76
75
* x86_64-apple-ios
77
76
* x86_64-linux-android
77
+ * x86_64-apple-darwin
78
78
* x86_64-unknown-illumos
79
79
* x86_64-unknown-netbsd
80
80
Original file line number Diff line number Diff line change @@ -1476,8 +1476,8 @@ impl From<SockaddrIn6> for net::SocketAddrV6 {
1476
1476
net:: SocketAddrV6 :: new (
1477
1477
net:: Ipv6Addr :: from ( addr. 0 . sin6_addr . s6_addr ) ,
1478
1478
u16:: from_be ( addr. 0 . sin6_port ) ,
1479
- u32 :: from_be ( addr. 0 . sin6_flowinfo ) ,
1480
- u32 :: from_be ( addr. 0 . sin6_scope_id ) ,
1479
+ addr. 0 . sin6_flowinfo ,
1480
+ addr. 0 . sin6_scope_id ,
1481
1481
)
1482
1482
}
1483
1483
}
@@ -3167,6 +3167,18 @@ mod tests {
3167
3167
SockaddrIn6 :: size( ) as usize
3168
3168
) ;
3169
3169
}
3170
+
3171
+ #[ test]
3172
+ // Ensure that we can convert to-and-from std::net variants without change.
3173
+ fn to_and_from ( ) {
3174
+ let s = "[1234:5678:90ab:cdef::1111:2222]:8080" ;
3175
+ let mut nix_sin6 = SockaddrIn6 :: from_str ( s) . unwrap ( ) ;
3176
+ nix_sin6. 0 . sin6_flowinfo = 0x12345678 ;
3177
+ nix_sin6. 0 . sin6_scope_id = 0x9abcdef0 ;
3178
+
3179
+ let std_sin6 : std:: net:: SocketAddrV6 = nix_sin6. into ( ) ;
3180
+ assert_eq ! ( nix_sin6, std_sin6. into( ) ) ;
3181
+ }
3170
3182
}
3171
3183
3172
3184
mod sockaddr_storage {
Original file line number Diff line number Diff line change @@ -1298,7 +1298,7 @@ impl<'a> ControlMessage<'a> {
1298
1298
}
1299
1299
#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
1300
1300
ControlMessage :: AlgSetIv ( iv) => {
1301
- mem:: size_of_val ( & iv ) + iv. len( )
1301
+ mem:: size_of :: < & [ u8 ] > ( ) + iv. len( )
1302
1302
} ,
1303
1303
#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
1304
1304
ControlMessage :: AlgSetOp ( op) => {
You can’t perform that action at this time.
0 commit comments