You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
freshtomato-arm/release/src-rt-6.x.4708/router/patches/miniupnpd/102-do-not-disable-port-for...

63 lines
4.6 KiB
Diff

--- miniupnpd/miniupnpd.c
+++ miniupnpd/miniupnpd.c
@@ -1102,15 +1102,15 @@
syslog(LOG_INFO, "STUN: ext interface %s has now public IP address %s and firewall does not block incoming connections set by miniunnpd", ext_if_name, if_addr_str);
syslog(LOG_INFO, "Port forwarding is now enabled");
} else if ((init || !disable_port_forwarding) && restrictive_nat) {
- if (addr_is_reserved(&if_addr)) {
- syslog(LOG_WARNING, "STUN: ext interface %s with private IP address %s is now behind restrictive or symmetric NAT with public IP address %s which does not support port forwarding", ext_if_name, if_addr_str, ext_addr_str);
- syslog(LOG_WARNING, "NAT on upstream router blocks incoming connections set by miniupnpd");
- syslog(LOG_WARNING, "Turn off NAT on upstream router or change it to full-cone NAT 1:1 type");
- } else {
- syslog(LOG_WARNING, "STUN: ext interface %s has now public IP address %s but firewall filters incoming connections set by miniunnpd", ext_if_name, if_addr_str);
- syslog(LOG_WARNING, "Check configuration of firewall on local machine and also on upstream router");
- }
- syslog(LOG_WARNING, "Port forwarding is now disabled");
+// if (addr_is_reserved(&if_addr)) {
+// syslog(LOG_WARNING, "STUN: ext interface %s with private IP address %s is now behind restrictive or symmetric NAT with public IP address %s which does not support port forwarding", ext_if_name, if_addr_str, ext_addr_str);
+// syslog(LOG_WARNING, "NAT on upstream router blocks incoming connections set by miniupnpd");
+// syslog(LOG_WARNING, "Turn off NAT on upstream router or change it to full-cone NAT 1:1 type");
+// } else {
+// syslog(LOG_WARNING, "STUN: ext interface %s has now public IP address %s but firewall filters incoming connections set by miniunnpd", ext_if_name, if_addr_str);
+// syslog(LOG_WARNING, "Check configuration of firewall on local machine and also on upstream router");
+// }
+ syslog(LOG_WARNING, "STUN: ext interface %s with IP address %s is now behind restrictive NAT with public IP address %s: Port forwarding might not work properly", ext_if_name, if_addr_str, ext_addr_str);
} else {
syslog(LOG_INFO, "STUN: ... done");
}
@@ -2191,11 +2191,11 @@
if (getifaddr(ext_if_name, if_addr, INET_ADDRSTRLEN, &addr, NULL) < 0) {
syslog(LOG_WARNING, "Cannot get IP address for ext interface %s. Network is down", ext_if_name);
} else if (addr_is_reserved(&addr)) {
- syslog(LOG_INFO, "Reserved / private IP address %s on ext interface %s: Port forwarding is impossible", if_addr, ext_if_name);
- syslog(LOG_INFO, "You are probably behind NAT, enable option ext_perform_stun=yes to detect public IP address");
- syslog(LOG_INFO, "Or use ext_ip= / -o option to declare public IP address");
- syslog(LOG_INFO, "Public IP address is required by UPnP/PCP/PMP protocols and clients do not work without it");
- disable_port_forwarding = 1;
+// syslog(LOG_INFO, "Reserved / private IP address %s on ext interface %s: Port forwarding is impossible", if_addr, ext_if_name);
+// syslog(LOG_INFO, "You are probably behind NAT, enable option ext_perform_stun=yes to detect public IP address");
+// syslog(LOG_INFO, "Or use ext_ip= / -o option to declare public IP address");
+// syslog(LOG_INFO, "Public IP address is required by UPnP/PCP/PMP protocols and clients do not work without it");
+// disable_port_forwarding = 1;
}
}
@@ -2464,12 +2464,12 @@
if (disable_port_forwarding && !reserved) {
syslog(LOG_INFO, "Public IP address %s on ext interface %s: Port forwarding is enabled", if_addr, ext_if_name);
} else if (!disable_port_forwarding && reserved) {
- syslog(LOG_INFO, "Reserved / private IP address %s on ext interface %s: Port forwarding is impossible", if_addr, ext_if_name);
- syslog(LOG_INFO, "You are probably behind NAT, enable option ext_perform_stun=yes to detect public IP address");
- syslog(LOG_INFO, "Or use ext_ip= / -o option to declare public IP address");
- syslog(LOG_INFO, "Public IP address is required by UPnP/PCP/PMP protocols and clients do not work without it");
+ syslog(LOG_INFO, "Reserved / private IP address %s on ext interface %s: Port forwarding might not work properly", if_addr, ext_if_name);
+// syslog(LOG_INFO, "You are probably behind NAT, enable option ext_perform_stun=yes to detect public IP address");
+// syslog(LOG_INFO, "Or use ext_ip= / -o option to declare public IP address");
+// syslog(LOG_INFO, "Public IP address is required by UPnP/PCP/PMP protocols and clients do not work without it");
}
- disable_port_forwarding = reserved;
+// disable_port_forwarding = reserved;
}
}
#ifdef ENABLE_NATPMP