Merge pull request #160 from ericshu6/master

- Update README.md: Add RAX75
- Increase time to wait for Ethernet connection
This commit is contained in:
Joseph C. Lehner 2024-11-25 08:44:14 +01:00 committed by GitHub
commit fa283a3583
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions

View file

@ -6,7 +6,7 @@ nmrpflash - Netgear Unbrick Utility
`nmrpflash` uses Netgear's [NMRP protocol](https://web.archive.org/web/www.chubb.wattle.id.au/PeterChubb/nmrp.html)
to flash a new firmware image to a compatible device. It has been successfully tested with
various models (D7000, DNG3700v2, EX2700, EX6100v2, EX6120, EX6150v2, EX8000, R6020, R6080, R6100, R6220, R6400, R7000,
R7000P, R6800, R8000, R8000P, R8500, RAX40, RBR40, RBS40, RBR50, RBS50, SRR60, SRS60, WAX202, WNDR3800, WNDR4300, WNDR4500v3,
R7000P, R6800, R8000, R8000P, R8500, RAX40, RAX75, RBR40, RBS40, RBR50, RBS50, SRR60, SRS60, WAX202, WNDR3800, WNDR4300, WNDR4500v3,
WNDR4700, WNR3500), but is likely to be compatible with most other Netgear devices as well.
Prebuilt binaries for Linux, macOS and Windows are available [here](https://github.com/jclehner/nmrpflash/releases/latest)

4
nmrp.c
View file

@ -497,7 +497,7 @@ int nmrp_do(struct nmrpd_args *args)
bool unplugged = true;
time_t beg = time_monotonic();
while (!g_interrupted && (time_monotonic() - beg) < 20) {
while (!g_interrupted && (time_monotonic() - beg) < NMRP_ETH_TIMEOUT_S) {
if (!ethsock_is_unplugged(sock)) {
unplugged = false;
break;
@ -540,7 +540,7 @@ int nmrp_do(struct nmrpd_args *args)
}
}
if (ethsock_set_timeout(sock, 20)) {
if (ethsock_set_timeout(sock, NMRP_ETH_TIMEOUT_S)) {
goto out;
}

View file

@ -84,6 +84,8 @@
#define NMRP_DEFAULT_SUBNET "255.255.255.0"
#define NMRP_DEFAULT_TFTP_PORT 69
#define NMRP_ETH_TIMEOUT_S 60
struct eth_hdr {
uint8_t ether_dhost[6];
uint8_t ether_shost[6];