Skip to content

netsock_poll(): poll all network interfaces#2139

Merged
francescolavra merged 2 commits intomasterfrom
fix/net-loopback
Feb 28, 2026
Merged

netsock_poll(): poll all network interfaces#2139
francescolavra merged 2 commits intomasterfrom
fix/net-loopback

Conversation

@francescolavra
Copy link
Member

When the destination address of a network packet coincides with the address of a network interface, the packet is queued in the loopback queue of that interface. The netsock_poll() function is only polling the loopback interface, therefore it misses packets whose destination is the address of a non-loopback interface.
This change set ensures that the netsock_poll() function polls all interfaces instead of just the loopback interface.
This first commit is an unrelated fix for a build error that occurs with binutils version 2.46.

Francesco Lavra added 2 commits February 22, 2026 18:20
Starting with binutils version 2.46, `objcopy --target TARGET` only works
if the input file is for TARGET, whereas prior versions of objcopy accepted
other target input files and produced a TARGET output.
The objcopy invocation to produce the UEFI bootloader for x86 takes an ELF
input file, therefore it fails with "file format not recognized" when using
`--target efi-app-x86_64`.

Change the `--target` command line option to `-O` (synonym with
`--output-target`).
When the destination address of a network packet coincides with the address of a
network interface, the packet is queued in the loopback queue of that interface.
The netsock_poll() function is only polling the loopback interface, therefore it
misses packets whose destination is the address of a non-loopback interface.

Change netsock_poll() so that it polls all interfaces instead of just the
loopback interface.
@francescolavra
Copy link
Member Author

This fixes also the following warning when running Payara 7.2025.2 on Azul JRE 25.0.1:

[#|2026-02-22T20:04:27.687+0000|WARNING|Payara 7.2025.2|javax.enterprise.system.jmx|_ThreadID=173;_ThreadName=Thread-18;_TimeMillis=1771790667687;_LevelValue=900;_MessageID=NCLS-JMX-00007;|
Cannot start JMX connector JmxConnector config: { name = system, Protocol = rmi_jrmp, Address = 0.0.0.0, Port = 8686, AcceptAll = false, AuthRealmName = admin-realm, SecurityEnabled = false} due to exception java.io.IOException: Cannot bind to URL [rmi://0.0.0.0:8686/jmxrmi]: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: Exception creating connection to: 0.0.0.0; nested exception is:
java.net.SocketException: Software caused connection abort]|#]

@francescolavra francescolavra merged commit 8b15a8a into master Feb 28, 2026
7 checks passed
@francescolavra francescolavra deleted the fix/net-loopback branch February 28, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant