Changeset 16260
- Timestamp:
- 02/22/11 13:50:10 (2 years ago)
- Location:
- src/router
- Files:
-
- 8 edited
-
httpd/modules/broadcom.c (modified) (1 diff)
-
httpd/visuals/ejs.c (modified) (1 diff)
-
httpd/visuals/index.c (modified) (1 diff)
-
httpd/visuals/setupassistant.c (modified) (1 diff)
-
httpd/visuals/status.c (modified) (4 diffs)
-
libutils/bcmutils.c (modified) (1 diff)
-
libutils/utils.c (modified) (3 diffs)
-
rc/services.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/router/httpd/modules/broadcom.c
r15745 r16260 1115 1115 {"Status_Internet", "Connect_3g", "start_3g", 1, RESTART, NULL}, // for 1116 1116 {"Status_Internet", "Disconnect_3g", "stop_3g", 2, SERVICE_RESTART, "stop_ppp"}, // for 1117 #endif 1118 #ifdef HAVE_PPPOATM 1119 {"Status_Internet", "Connect_pppoa", "start_pppoa", 1, RESTART, NULL}, // for 1120 {"Status_Internet", "Disconnect_pppoa", "stop_pppoa", 2, SERVICE_RESTART, "stop_ppp"}, // for 1117 1121 #endif 1118 1122 {"Status_Internet", "Connect_pppoe", "start_pppoe", 1, RESTART, NULL}, // for -
src/router/httpd/visuals/ejs.c
r16205 r16260 2082 2082 2083 2083 wan_link = check_wan_link(0); 2084 2085 if (nvram_match("wan_proto", "pptp")) { 2086 wan_ipaddr = 2087 wan_link ? nvram_safe_get("pptp_get_ip") : 2088 nvram_safe_get("wan_ipaddr"); 2089 } else if (!strcmp(nvram_safe_get("wan_proto"), "pppoe")) { 2090 wan_ipaddr = 2091 wan_link ? nvram_safe_get("wan_ipaddr") : "0.0.0.0"; 2084 char *wan_proto = nvram_safe_get("wan_proto"); 2085 if (!strcmp(wan_proto, "pptp")) { 2086 wan_ipaddr = wan_link ? nvram_safe_get("pptp_get_ip") : nvram_safe_get("wan_ipaddr"); 2087 } else if (!strcmp(wan_proto, "pppoe") 2092 2088 #ifdef HAVE_PPPOATM 2093 } else if (!strcmp(nvram_safe_get("wan_proto"), "pppoa")) { 2094 wan_ipaddr = 2095 wan_link ? nvram_safe_get("wan_ipaddr") : "0.0.0.0"; 2089 || !strcmp(wan_proto, "pppoa") 2096 2090 #endif 2097 2091 #ifdef HAVE_3G 2098 } else if (!strcmp(nvram_safe_get("wan_proto"), "3g")) {2099 wan_ipaddr = 2100 wan_link ? nvram_safe_get("wan_ipaddr") : "0.0.0.0";2101 #endif 2092 || !strcmp(wan_proto, "3g") 2093 #endif 2094 ) { 2095 wan_ipaddr = wan_link ? nvram_safe_get("wan_ipaddr") : "0.0.0.0"; 2102 2096 #ifdef HAVE_L2TP 2103 2097 } else if (nvram_match("wan_proto", "l2tp")) { -
src/router/httpd/visuals/index.c
r16189 r16260 16 16 if (type == NULL) 17 17 type = nvram_safe_get("wan_proto"); 18 if (!strcmp(type, "static")) 19 do_ej(NULL, "index_static.asp", wp, NULL); 20 #ifdef HAVE_PPPOE 21 else if (!strcmp(type, "pppoe")) 22 do_ej(NULL, "index_pppoe.asp", wp, NULL); 23 #endif 24 #ifdef HAVE_PPPOATM 25 else if (!strcmp(type, "pppoa")) 26 do_ej(NULL, "index_pppoa.asp", wp, NULL); 27 #endif 28 #ifdef HAVE_PPTP 29 else if (!strcmp(type, "pptp")) 30 do_ej(NULL, "index_pptp.asp", wp, NULL); 31 #endif 32 #ifdef HAVE_L2TP 33 else if (!strcmp(type, "l2tp")) 34 do_ej(NULL, "index_l2tp.asp", wp, NULL); 35 #endif 36 #ifdef HAVE_HEARTBEAT 37 else if (!strcmp(type, "heartbeat")) 38 do_ej(NULL, "index_heartbeat.asp", wp, NULL); 39 #endif 40 #ifdef HAVE_3G 41 else if (!strcmp(type, "3g")) 42 do_ej(NULL, "index_3g.asp", wp, NULL); 43 #endif 18 char ejname[32]; 19 snprintf(ejname,31,"index_%s",type); 20 do_ej(NULL, ejname, wp, NULL); 44 21 } 45 22 -
src/router/httpd/visuals/setupassistant.c
r15868 r16260 186 186 if (type == NULL) 187 187 type = nvram_safe_get("wan_proto"); 188 if (!strcmp(type, "static")) 189 do_ej(NULL, "sas_static.asp", wp, NULL); 190 #ifdef HAVE_PPPOE 191 else if (!strcmp(type, "pppoe")) 192 do_ej(NULL, "sas_pppoe.asp", wp, NULL); 193 #endif 194 #ifdef HAVE_PPTP 195 else if (!strcmp(type, "pptp")) 196 do_ej(NULL, "sas_pptp.asp", wp, NULL); 197 #endif 198 #ifdef HAVE_L2TP 199 else if (!strcmp(type, "l2tp")) 200 do_ej(NULL, "sas_l2tp.asp", wp, NULL); 201 #endif 202 #ifdef HAVE_HEARTBEAT 203 else if (!strcmp(type, "heartbeat")) 204 do_ej(NULL, "sas_heartbeat.asp", wp, NULL); 205 #endif 206 #ifdef HAVE_3G 207 else if (!strcmp(type, "3g")) 208 do_ej(NULL, "sas_3g.asp", wp, NULL); 209 #endif 188 char ejname[32]; 189 snprintf(ejname,31,"sas_%s",type); 190 do_ej(NULL, ejname, wp, NULL); 210 191 } 211 192 -
src/router/httpd/visuals/status.c
r16191 r16260 115 115 wan_link ? nvram_safe_get("wan_gateway") : 116 116 nvram_safe_get("pptp_server_ip"); 117 } else if (!strcmp(wan_proto, "pppoe")) { 117 } else if (!strcmp(wan_proto, "pppoe") 118 #ifdef HAVE_PPPOATM 119 || !strcmp(wan_proto, "pppoa") 120 #endif 121 #ifdef HAVE_3G 122 || !strcmp(wan_proto, "3g") 123 #endif 124 ) { 118 125 wan_ipaddr = 119 126 wan_link ? nvram_safe_get("wan_ipaddr") : "0.0.0.0"; … … 123 130 wan_link ? nvram_safe_get("wan_gateway") : "0.0.0.0"; 124 131 } 125 #ifdef HAVE_PPPOATM126 else if (!strcmp(wan_proto, "pppoa")) {127 wan_ipaddr =128 wan_link ? nvram_safe_get("wan_ipaddr") : "0.0.0.0";129 wan_netmask =130 wan_link ? nvram_safe_get("wan_netmask") : "0.0.0.0";131 wan_gateway =132 wan_link ? nvram_safe_get("wan_gateway") : "0.0.0.0";133 }134 #endif135 #ifdef HAVE_3G136 else if (!strcmp(wan_proto, "3g")) {137 wan_ipaddr =138 wan_link ? nvram_safe_get("wan_ipaddr") : "0.0.0.0";139 wan_netmask =140 wan_link ? nvram_safe_get("wan_netmask") : "0.0.0.0";141 wan_gateway =142 wan_link ? nvram_safe_get("wan_gateway") : "0.0.0.0";143 }144 #endif145 132 #ifdef HAVE_L2TP 146 133 else if (!strcmp(wan_proto, "l2tp")) { … … 164 151 dns_list = get_dns_list(); 165 152 166 if (!strcmp(wan_proto, "pppoe") || !strcmp(wan_proto, "pptp") 153 if (!strcmp(wan_proto, "pppoe") 154 || !strcmp(wan_proto, "pptp") 155 #ifdef HAVE_3G 167 156 || !strcmp(wan_proto, "3g") 157 #endif 158 #ifdef HAVE_PPPOATM 168 159 || !strcmp(wan_proto, "pppoa") 169 || !strcmp(wan_proto, "l2tp") || !strcmp(wan_proto, "heartbeat")) { 160 #endif 161 #ifdef HAVE_L2TP 162 || !strcmp(wan_proto, "l2tp") 163 #endif 164 || !strcmp(wan_proto, "heartbeat")) { 170 165 hidden1 = ""; 171 166 hidden2 = ""; … … 251 246 char buf[254]; 252 247 253 if (!strcmp(wan_proto, "pppoe") || !strcmp(wan_proto, "pptp") 248 if (!strcmp(wan_proto, "pppoe") 249 || !strcmp(wan_proto, "pptp") 250 #ifdef HAVE_3G 254 251 || !strcmp(wan_proto, "3g") 252 #endif 253 #ifdef HAVE_PPPOATM 255 254 || !strcmp(wan_proto, "pppoa") 256 || !strcmp(wan_proto, "l2tp") || !strcmp(wan_proto, "heartbeat")) { 255 #endif 256 #ifdef HAVE_L2TP 257 || !strcmp(wan_proto, "l2tp") 258 #endif 259 || !strcmp(wan_proto, "heartbeat")) { 257 260 258 261 /* -
src/router/libutils/bcmutils.c
r16187 r16260 489 489 if (dns_list->num_servers == 0 && (nvram_match("wan_proto", "pppoe") 490 490 || nvram_match("wan_proto", "pptp") 491 #ifdef HAVE_PPPOATM 491 492 || nvram_match("wan_proto", "pppoa") 493 #endif 494 #ifdef HAVE_L2TP 492 495 || nvram_match("wan_proto", "l2tp") 496 #endif 497 #ifdef HAVE_3G 493 498 || nvram_match("wan_proto", "3g")) 499 #endif 494 500 && nvram_match("ppp_demand", "1")) 495 501 fprintf(fp_w, "nameserver 1.1.1.1\n"); -
src/router/libutils/utils.c
r16249 r16260 2186 2186 2187 2187 if ((nvram_match("wan_proto", "pptp") 2188 #ifdef HAVE_L2TP 2188 2189 || nvram_match("wan_proto", "l2tp") 2190 #endif 2191 #ifdef HAVE_PPPOE 2189 2192 || nvram_match("wan_proto", "pppoe") 2193 #endif 2194 #ifdef HAVE_PPPOA 2190 2195 || nvram_match("wan_proto", "pppoa") 2196 #endif 2197 #ifdef HAVE_3G 2191 2198 || nvram_match("wan_proto", "3g") 2199 #endif 2192 2200 || nvram_match("wan_proto", "heartbeat")) 2193 2201 && !nvram_match("3gdata", "hso")) { … … 2269 2277 { 2270 2278 char *wan_ipaddr; 2279 char *wan_proto = nvram_safe_get("wan_proto"); 2271 2280 int wan_link = check_wan_link(0); 2272 2281 2273 if ( nvram_match("wan_proto", "pptp")) {2282 if (!strcmp(wan_proto, "pptp")) { 2274 2283 wan_ipaddr = 2275 2284 wan_link ? nvram_safe_get("pptp_get_ip") : 2276 2285 nvram_safe_get("wan_ipaddr"); 2277 } else if (!strcmp(nvram_safe_get("wan_proto"), "pppoe")) { 2278 wan_ipaddr = 2279 wan_link ? nvram_safe_get("wan_ipaddr") : "0.0.0.0"; 2286 } else if (!strcmp(wan_proto, "pppoe") 2280 2287 #ifdef HAVE_PPPOATM 2281 } else if (!strcmp(nvram_safe_get("wan_proto"), "pppoa")) { 2282 wan_ipaddr = 2283 wan_link ? nvram_safe_get("wan_ipaddr") : "0.0.0.0"; 2288 || !strcmp(wan_proto, "pppoa") 2284 2289 #endif 2285 2290 #ifdef HAVE_3G 2286 } else if (!strcmp(nvram_safe_get("wan_proto"), "3g")) {2287 wan_ipaddr = 2288 wan_link ? nvram_safe_get("wan_ipaddr") : "0.0.0.0";2289 #endif 2291 || !strcmp(wan_proto, "3g") 2292 #endif 2293 ) { 2294 wan_ipaddr = wan_link ? nvram_safe_get("wan_ipaddr") : "0.0.0.0"; 2290 2295 #ifdef HAVE_L2TP 2291 } else if (nvram_match("wan_proto", "l2tp")) { 2292 wan_ipaddr = 2293 wan_link ? nvram_safe_get("l2tp_get_ip") : 2294 nvram_safe_get("wan_ipaddr"); 2296 } else if (!strcmp(wan_proto, "l2tp")) { 2297 wan_ipaddr = wan_link ? nvram_safe_get("l2tp_get_ip") : nvram_safe_get("wan_ipaddr"); 2295 2298 #endif 2296 2299 } else { … … 2739 2742 */ 2740 2743 if (nvram_match("wan_proto", "pptp") 2744 #ifdef HAVE_L2TP 2741 2745 || nvram_match("wan_proto", "l2tp") 2746 #endif 2747 #ifdef HAVE_3G 2742 2748 || nvram_match("wan_proto", "3g") 2749 #endif 2750 #ifdef HAVE_PPPOATM 2743 2751 || nvram_match("wan_proto", "pppoa") 2752 #endif 2744 2753 || nvram_match("wan_proto", "pppoe")) { 2745 2754 if (nvram_match("pppd_pppifname", "")) -
src/router/rc/services.c
r15641 r16260 1068 1068 {"stop_3g", handle_spppoe}, 1069 1069 #endif 1070 #ifdef HAVE_PPPOATM 1071 {"start_pppoa", handle_pppoe}, 1072 {"stop_pppoa", handle_spppoe}, 1073 #endif 1070 1074 {"start_pppoe", handle_pppoe}, 1075 {"stop_pppoe", handle_spppoe}, 1071 1076 {"start_pptp", handle_pppoe}, 1077 {"stop_pptp", handle_spppoe}, 1072 1078 #ifdef HAVE_L2TP 1073 1079 {"start_l2tp", handle_pppoe},
Note: See TracChangeset
for help on using the changeset viewer.
