merlin@mint-dev ~/asuswrt/release/src-rt/router/rc $ git diff 374.42 374.43 -- .
diff --git a/release/src/router/rc/firewall.c b/release/src/router/rc/firewall.c
index 6b2cf62..509ef86 100644
--- a/release/src/router/rc/firewall.c
+++ b/release/src/router/rc/firewall.c
@@ -4133,6 +4133,21 @@ mangle_setting(char *wan_if, char *wan_ip, char *lan_if, char *lan_ip, char *log
"-m", "state", "--state", "NEW", "-j", "MARK", "--set-mark", "0x01");
}
#endif
+#ifdef RTCONFIG_BCMARM
+ /* mark STUN connection*/
+ if (nvram_match("fw_pt_stun", "1")) {
+ eval("iptables", "-t", "mangle", "-A", "FORWARD",
+ "-p", "udp",
+ "-m", "state", "--state", "NEW", "-j", "MARK", "--set-mark", "0x01");
+ }
+
+#ifdef RTCONFIG_IPV6
+ if (get_ipv6_service() == IPV6_6IN4) {
+ eval("ip6tables", "-t", "mangle", "-A", "FORWARD",
+ "-m", "state", "--state", "NEW", "-j", "MARK", "--set-mark", "0x01");
+ }
+#endif
+#endif
}
#endif
}
diff --git a/release/src/router/rc/lan.c b/release/src/router/rc/lan.c
index cc98d32..f7566ae 100644
--- a/release/src/router/rc/lan.c
+++ b/release/src/router/rc/lan.c
@@ -3221,7 +3221,7 @@ void lanaccess_mssid_ban(const char *limited_ifname)
eval("ebtables", "-A", "FORWARD", "-o", (char*)limited_ifname, "-j", "DROP"); // so that traffic via host and nat is passed
snprintf(lan_subnet, sizeof(lan_subnet), "%s/%s", nvram_safe_get("lan_ipaddr"), nvram_safe_get("lan_netmask"));
- eval("ebtables", "-t", "broute", "-A", "BROUTING", "-i", (char*)limited_ifname, "--ip-dst", lan_subnet, "--ip-proto", "tcp", "-j", "DROP");
+ eval("ebtables", "-t", "broute", "-A", "BROUTING", "-i", (char*)limited_ifname, "-p", "ipv4", "--ip-dst", lan_subnet, "--ip-proto", "tcp", "-j", "DROP");
}
void lanaccess_wl(void)
diff --git a/release/src/router/rc/services.c b/release/src/router/rc/services.c
index f34e69b..220e49c 100644
--- a/release/src/router/rc/services.c
+++ b/release/src/router/rc/services.c
@@ -707,6 +707,9 @@ void start_dnsmasq(int force)
if (nvram_get_int("dhcpd_auth") >= 0)
fprintf(fp, "dhcp-authoritative\n");
+ /* Workaround for broken Win7/IE behaviour */
+ fprintf(fp,"dhcp-option=252,\"\\n\"\n");
+
/* LAN Domain */
nv = nvram_safe_get("lan_domain");
if (*nv)
diff --git a/release/src/router/rc/sysdeps/init-broadcom.c b/release/src/router/rc/sysdeps/init-broadcom.c
index 9686b88..54f44f5 100644
--- a/release/src/router/rc/sysdeps/init-broadcom.c
+++ b/release/src/router/rc/sysdeps/init-broadcom.c
@@ -3534,7 +3534,7 @@ void generate_wl_para(int unit, int subunit)
char tmp[100], prefix[]="wlXXXXXXX_";
char tmp2[100], prefix2[]="wlXXXXXXX_";
- char list[1200];
+ char list[3500];
char *nv, *nvp, *b, *c;
#ifndef RTCONFIG_BCMWL6
char word[256], *next;
diff --git a/release/src/router/rc/watchdog.c b/release/src/router/rc/watchdog.c
index d4ce3cb..6a36918 100644
--- a/release/src/router/rc/watchdog.c
+++ b/release/src/router/rc/watchdog.c
@@ -70,6 +70,7 @@
#define NORMAL_PERIOD 1 /* second */
#define URGENT_PERIOD 100 * 1000 /* microsecond */
#define RUSHURGENT_PERIOD 50 * 1000 /* microsecond */
+#define DAY_PERIOD 2 * 60 * 24 /* 1 day (in 30 sec periods) */
#define WPS_TIMEOUT_COUNT 121 * 20
#define WPS_WAIT 1 /* seconds */
@@ -108,6 +109,7 @@ static int wsc_timeout = 0;
static int btn_count_setup_second = 0;
static int btn_pressed_toggle_radio = 0;
#endif
+static long ddns_update_timer = 0;
#ifdef RTCONFIG_WIRELESS_SWITCH
// for WLAN sw init, only for slide switch
@@ -1302,6 +1304,7 @@ void ddns_check(void)
unlink("/tmp/ddns.cache");
logmessage("watchdog", "start ddns.");
notify_rc("start_ddns");
+ ddns_update_timer = 0;
}
return;
}
@@ -1778,6 +1781,7 @@ period_chk_cnt()
void watchdog(int sig)
{
+ int period;
#ifdef RTCONFIG_PUSH_EMAIL
push_mail();
#endif
@@ -1844,6 +1848,14 @@ void watchdog(int sig)
#if 0
cpu_usage_monitor();
#endif
+
+ /* Force a DDNS update every "x" days - default is 21 days */
+ period = nvram_get_int("ddns_refresh_x");
+ if ((period) && (++ddns_update_timer >= (DAY_PERIOD * period))) {
+ ddns_update_timer = 0;
+ nvram_set("ddns_updated", "0");
+ }
+
ddns_check();
//#if defined(RTCONFIG_JFFS2LOG) && defined(RTCONFIG_JFFS2)