File tree Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,13 @@ pub fn sys_bind(
123
123
let socket = file. node ( ) . socket ( ) . ok_or_else ( || errno ! ( ENOTSOCK ) ) ?;
124
124
let address = parse_socket_address ( current_task, user_socket_address, address_length) ?;
125
125
if !address. valid_for_domain ( socket. domain ) {
126
- return error ! ( EINVAL ) ;
126
+ return match socket. domain {
127
+ SocketDomain :: Unix
128
+ | SocketDomain :: Vsock
129
+ | SocketDomain :: Inet6
130
+ | SocketDomain :: Netlink => error ! ( EINVAL ) ,
131
+ SocketDomain :: Inet => error ! ( EAFNOSUPPORT ) ,
132
+ } ;
127
133
}
128
134
match address {
129
135
SocketAddress :: Unspecified => return error ! ( EINVAL ) ,
Original file line number Diff line number Diff line change 410
410
"PingSocket.PayloadTooLarge" ,
411
411
"PingSocket.ReceiveIPPacketInfo" ,
412
412
"PingSocket.ReceiveIPv6PktInfo" ,
413
- "PingSockets/Fixture.Bind/ICMP_socket_V6Any" ,
414
- "PingSockets/Fixture.Bind/ICMP_socket_V6Loopback" ,
415
- "PingSockets/Fixture.Bind/ICMP_socket_V6Multicast" ,
416
- "PingSockets/Fixture.Bind/ICMP_socket_V6MulticastInterfaceLocalAllNodes" ,
417
- "PingSockets/Fixture.Bind/ICMP_socket_V6MulticastLinkLocalAllNodes" ,
418
- "PingSockets/Fixture.Bind/ICMP_socket_V6MulticastLinkLocalAllRouters" ,
419
- "PingSockets/Fixture.Bind/ICMP_socket_IPv6UnknownUnicast" ,
420
413
421
414
// pivot_root_test
422
415
"PivotRootTest.WithoutCapability" ,
Original file line number Diff line number Diff line change 46
46
"asapi_01" ,
47
47
"asapi_03" ,
48
48
"autogroup01" ,
49
- "bind01" ,
50
- "bind01" ,
51
49
"bind02" ,
52
50
"bind05" ,
53
51
"bind06" ,
You can’t perform that action at this time.
0 commit comments