mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-07 13:39:55 +00:00
sceNetConfigGetDefaultRoute threw. It now writes the IPv4 gateway of the host interface that libSceNetCtl's sceNetCtlGetInfo already describes as DEFAULT_ROUTE, in network byte order, the order sceNetInetPton writes an AF_INET address in, and returns 0. libSceNetCtl exports NetCtlHostIpv4Gateway_nid_no_patch for it, next to the DNS helper sceNetGetDnsInfo uses. Without a gateway, or for a null pointer, it still throws: the console's answer for a missing route is not measured. Tested: guest_sce_net_tests, after sceNetCtlInit, prints the gateway with sceNetInetNtop and compares it with sceNetCtlGetInfo's DEFAULT_ROUTE text (192.0.2.1 on this host); a null pointer throws. On a host without a default route the case checks that the call throws and leaves the output untouched.