Changeset 10957
- Timestamp:
- 11/19/08 19:45:58 (4 years ago)
- Location:
- src/router/httpd
- Files:
-
- 2 edited
-
modules/broadcom.c (modified) (1 diff)
-
validate/validators.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/router/httpd/modules/broadcom.c
r10932 r10957 328 328 { 329 329 tmp->validatename = "validate_wan_ipaddr"; 330 } 331 if( !stricmp( tmpstr, "MERGEREMOTEIP" ) ) 332 { 333 tmp->validatename = "validate_remote_ip"; 334 tmp->argv = 335 ( char ** )malloc( sizeof( char ** ) * 2 ); 336 tmp->argv[0] = getFileString( in ); 337 tmp->argv[1] = NULL; 330 338 } 331 339 if( !stricmp( tmpstr, "MERGEIPADDRS" ) ) -
src/router/httpd/validate/validators.c
r10731 r10957 878 878 } 879 879 880 void 881 validate_remote_ip(webs_t wp, char *value, struct variable *v) 882 { 883 char from[20], *to; 884 char remote_ip[254]; 885 886 get_merge_ipaddr(wp, v->name, from); 887 to = websGetVar(wp, "remote_ip_4", NULL); 888 889 if( !valid_ipaddr( wp, from, v ) ) 890 return; 891 892 snprintf(remote_ip, sizeof(remote_ip), "%s %s", from, to); 893 nvram_set("remote_ip", remote_ip); 894 895 } 896 897 880 898 #define SRL_VALID(v) (((v) > 0) && ((v) <= 15)) 881 899 #define SFBL_VALID(v) (((v) > 0) && ((v) <= 15))
Note: See TracChangeset
for help on using the changeset viewer.
