From ad1c80587246972c12b1a90a55c53575c6ae74d5 Mon Sep 17 00:00:00 2001 From: JS Deck Date: Sat, 3 Feb 2024 21:49:51 -0400 Subject: [PATCH] Fix regression where viewer cannot update its IP address to 3DS --- include/constants.h | 3 ++- source/nwm/rp_nwm.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/constants.h b/include/constants.h index 26dbcce..81fffdf 100644 --- a/include/constants.h +++ b/include/constants.h @@ -69,8 +69,9 @@ static const u32 IoBasePdc = 0x10400000 + 0x80000000; #define NS_MENU_LISTEN_PORT (8000) #define NS_HOOK_LISTEN_PORT (5000) -#define NWM_INIT_SRC_PORT (8000) +#define NWM_INIT_SRC_PORT (8001) #define NWM_INIT_DST_PORT (8001) +#define RP_SRC_PORT (8000) #define RP_DST_PORT_DEFAULT (8001) #define RP_THREAD_PRIO_DEFAULT (0x10) #define RP_CORE_COUNT_MAX (3) diff --git a/source/nwm/rp_nwm.c b/source/nwm/rp_nwm.c index fd6d7de..2e5b8e4 100644 --- a/source/nwm/rp_nwm.c +++ b/source/nwm/rp_nwm.c @@ -187,7 +187,7 @@ static uint16_t ip_checksum(void *vdata, size_t length) { static int initUDPPacket(u8 *rpNwmBufferCur, int dataLen) { dataLen += 8; - *(u16*)(rpNwmBufferCur + 0x22 + 8) = htons(8000); // src port + *(u16*)(rpNwmBufferCur + 0x22 + 8) = htons(RP_SRC_PORT); // src port *(u16*)(rpNwmBufferCur + 0x24 + 8) = htons(ALR(&rpConfig->dstPort)); // dest port *(u16*)(rpNwmBufferCur + 0x26 + 8) = htons(dataLen); *(u16*)(rpNwmBufferCur + 0x28 + 8) = 0; // no checksum