From 6480094d9b23987a1d5d399dc4674e4913abe8ba Mon Sep 17 00:00:00 2001 From: Toastman Date: Sun, 15 Jan 2012 11:47:14 +0700 Subject: [PATCH] Revert "Static ARP: option to enable all known devices" This reverts commit c8a71f3ff7e43489114f357321d49801e94d220b. --- release/src/router/httpd/tomato.c | 7 +++---- release/src/router/nvram/defaults.c | 1 - release/src/router/rc/arpbind.c | 4 +--- release/src/router/www/basic-static.asp | 6 +----- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/release/src/router/httpd/tomato.c b/release/src/router/httpd/tomato.c index b90f0c8113..5c4cdcdcd2 100644 --- a/release/src/router/httpd/tomato.c +++ b/release/src/router/httpd/tomato.c @@ -515,10 +515,9 @@ static const nvset_t nvset_list[] = { // basic-static { "bwm_client", V_LENGTH(0, 4096) }, - { "dhcpd_static", V_LENGTH(0, 106*251)}, // 106 (max chars per entry) x 250 entries - { "dhcpd_static_only", V_01 }, - { "arpbind_static", V_LENGTH(0, 34*251)}, // 34 (max chars per entry) x 250 entries - { "arpbind_listed", V_01 }, // AB - Enable static ARP for all devices on list + { "dhcpd_static", V_LENGTH(0, 108*141) }, // 108 (max chars per entry) x 140 entries + { "dhcpd_static_only", V_01 }, + { "arpbind_static", V_LENGTH(0, 34*141) }, // 34 (max chars per entry) x 140 entries // basic-ddns { "ddnsx0", V_LENGTH(0, 2048) }, diff --git a/release/src/router/nvram/defaults.c b/release/src/router/nvram/defaults.c index 4cefddbd17..28fa235b17 100644 --- a/release/src/router/nvram/defaults.c +++ b/release/src/router/nvram/defaults.c @@ -365,7 +365,6 @@ const defaults_t defaults[] = { // basic-static { "dhcpd_static", "" }, - { "arpbind_listed", "0" }, // AB - Enable static ARP for all devices on list // basic-wfilter { "wl_maclist", "" }, // xx:xx:xx:xx:xx:xx ... = 17 diff --git a/release/src/router/rc/arpbind.c b/release/src/router/rc/arpbind.c index 6c260dd8bb..dc91d141d6 100644 --- a/release/src/router/rc/arpbind.c +++ b/release/src/router/rc/arpbind.c @@ -6,8 +6,6 @@ void start_arpbind(void) { const char *ipaddr, *macaddr; const char *name, *bind; - int anyways = nvram_get_int("arpbind_listed"); - nvp = nv = strdup(nvram_safe_get("dhcpd_static")); if (!nv) return; @@ -24,7 +22,7 @@ void start_arpbind(void) { continue; if (strchr(macaddr,',') != NULL) continue; - if ((strcmp(bind,"1") == 0) || (anyways)) + if (strcmp(bind,"1") == 0) eval ("arp", "-s", (char *)ipaddr, (char *)macaddr); } free(nv); diff --git a/release/src/router/www/basic-static.asp b/release/src/router/www/basic-static.asp index 216685beeb..928095d413 100644 --- a/release/src/router/www/basic-static.asp +++ b/release/src/router/www/basic-static.asp @@ -46,7 +46,7 @@ @@ -392,7 +389,6 @@ createFieldTable('', [ -- 2.11.4.GIT