cosmetics

This commit is contained in:
John Törnblom committed 2025-12-07 21:20:26 +01:00
1 parent 02cc699d1c
commit 7e95a9d66f
2 files changed
+11 -1

No files matched your search

+1 -1
View File
@@ -233,6 +233,7 @@ elfldr_load(pid_t pid, uint8_t *elf) {
ROUND_PG(phdr[i].p_memsz),
PFLAGS(phdr[i].p_flags))) {
LOG_PERROR("kernel_mprotect");
error = 1;
}
} else {
if(pt_mprotect(pid, ctx.base_addr + phdr[i].p_vaddr,
@@ -374,7 +375,6 @@ elfldr_prepare_exec(pid_t pid, uint8_t *elf) {
if(pt_setregs(pid, &r)) {
LOG_PERROR("pt_setregs");
pt_detach(pid, SIGKILL);
return -1;
}
+10
View File
@@ -128,8 +128,18 @@ notify_address(const char* prefix, int port) {
continue;
}
// skip localhost
if(!strncmp("lo", ifa->ifa_name, 2)) {
continue;
}
struct sockaddr_in *in = (struct sockaddr_in*)ifa->ifa_addr;
inet_ntop(AF_INET, &(in->sin_addr), ip, sizeof(ip));
// skip interfaces without an ip
if(!strncmp("0.", ip, 2)) {
continue;
}
}
freeifaddrs(ifaddr);