mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 22:36:00 +00:00
* fix(preload): accept NETLINK_ROUTE multicast subscriptions Programs that watch for network changes bind their route socket with multicast groups or join them with NETLINK_ADD_MEMBERSHIP. The emulated socket refused both with EACCES, and .NET's NetworkChange treats that as fatal: CurseForge's Mods Agent failed to initialise with "Permission denied" from NetworkChange.CreateSocket(), so the app never loaded its library. Real Linux lets unprivileged sockets join rtnetlink groups. Accept the groups at bind and through ADD/DROP_MEMBERSHIP, report them from getsockname(), and keep queries on the same socket working. No change events are generated yet; queries still return the current snapshot. * fix(preload): keep netlink group membership in the shared socket state Memberships now live in the peer metadata the kernel holds for the socket, next to the port and cap ack, so they survive exec and a change made by one process after fork is seen by every process holding the socket. * fix(session): answer denied /proc/net socket tables Android's SELinux policy denies app processes every file under /proc/net. .NET lists TCP listeners from /proc/net/tcp and tcp6 before it binds a server port, so the CurseForge Mods Agent failed on every port with "An error was encountered while querying information from the operating system" on stock firmware. Denied tcp, tcp6, udp and udp6 reads now get a header-only table, through open and openat as well as fopen, the same way the route and interface tables already are. * fix(session): keep synthesized socket tables read-only and file-only Reopen the populated table read-only instead of duplicating its writable descriptor, and leave O_DIRECTORY opens with their original failure.