11 Commits
Author SHA1 Message Date
Kevin KrakauerandgVisor bot 05476b800a fix panic caused by too-large buffer allocations
Reported-by: [email protected]
PiperOrigin-RevId: 475345594
2022-09-19 11:45:13 -07:00
Arthur SfezandgVisor bot 1d2822917b Support receiving ttl/hoplimit control message
PiperOrigin-RevId: 429096959
2022-02-16 11:27:21 -08:00
Arthur SfezandgVisor bot 7ea73a6830 Support receiving PKTINFO on icmp endpoints
PiperOrigin-RevId: 428599075
2022-02-14 13:51:49 -08:00
Arthur SfezandgVisor bot 60f5caa026 Add TOS control message for ICMP & RAW sockets
PiperOrigin-RevId: 426208980
2022-02-03 12:19:06 -08:00
Ghanan GowripalanandgVisor bot 13f83969cf Don't allow binding to broadcast on ICMP sockets
...to match Linux behaviour.

Fixes #5711.

PiperOrigin-RevId: 397132671
2021-09-16 11:53:49 -07:00
Ghanan GowripalanandgVisor bot cd0623bfd5 [bind] Return EINVAL for under sized address
...and EAFNOSUPPORT for unexpected address family.

To comply with Linux.

Updates #6021, #6575.

PiperOrigin-RevId: 396893590
2021-09-15 12:20:51 -07:00
Ghanan GowripalanandgVisor bot 129cc47c63 Move socket_test_util to //test/util
...and rename the library to socket_util.

PiperOrigin-RevId: 386348306
2021-07-22 16:37:15 -07:00
Sam BalanaandgVisor bot ded8aca3d1 Add bind syscall tests for ICMP and ICMPv6
Updates #5711
Updates #6021
Updates #6022

PiperOrigin-RevId: 377582446
2021-06-04 13:53:17 -07:00
Adin ScannellandgVisor bot ce8ee943e7 Remove _NoRandomSave tests.
We do not currently run random save tests.

PiperOrigin-RevId: 368309921
2021-04-13 15:42:41 -07:00
Tamir DubersteinandgVisor bot ca8e969a15 Correctly check permissions in ping socket test
The previous check was using SOCK_RAW, despite the fact that the test only uses
SOCK_DGRAM. Simplify the test machinery while I'm here.

PiperOrigin-RevId: 354359842
2021-01-28 11:50:29 -08:00
Bhasker HariharanandgVisor bot e0afd63c34 Fix error code returned due to Port exhaustion.
For TCP sockets gVisor incorrectly returns EAGAIN when no ephemeral ports are
available to bind during a connect. Linux returns EADDRNOTAVAIL. This change
fixes gVisor to return the correct code and adds a test for the same.

This change also fixes a minor bug for ping sockets where connect() would fail
with EINVAL unless the socket was bound first.

Also added tests for testing UDP Port exhaustion and Ping socket port
exhaustion.

PiperOrigin-RevId: 314988525
2020-06-05 13:43:01 -07:00