Ignore:
Timestamp:
08/21/07 19:10:17 (6 years ago)
Author:
BrainSlayer
Message:

check only for station on the first interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/router/httpd/modules/dd-wrt.c

    r7700 r7724  
    15751575 
    15761576static void 
    1577 show_security_prefix (webs_t wp, int argc, char_t ** argv, char *prefix) 
     1577show_security_prefix (webs_t wp, int argc, char_t ** argv, char *prefix,int primary) 
    15781578{ 
    15791579  char var[80]; 
     
    15971597             selmatch (var, "psk", "selected=\"selected\"")); 
    15981598  sprintf (sta, "%s_mode", prefix); 
    1599   if (nvram_match (sta, "ap")) 
     1599  if (!primary || nvram_match (sta, "ap")) 
    16001600    { 
    16011601      websWrite (wp, "<option value=\"wpa\" %s>WPA Enterprise</option>\n", 
     
    16051605             "<option value=\"psk2\" %s>WPA2 Personal</option>\n", 
    16061606             selmatch (var, "psk2", "selected=\"selected\"")); 
    1607   if (nvram_match (sta, "ap")) 
     1607  if (!primary || nvram_match (sta, "ap")) 
    16081608    { 
    16091609      websWrite (wp, "<option value=\"wpa2\" %s>WPA2 Enterprise</option>\n", 
     
    16211621             selmatch (var, "wep", "selected=\"selected\"")); 
    16221622#ifdef HAVE_WPA_SUPPLICANT 
    1623   if (nvram_match (sta, "sta") || nvram_match (sta, "apsta") || nvram_match (sta, "wet")) 
     1623  if (!primary || nvram_match (sta, "sta") || nvram_match (sta, "apsta") || nvram_match (sta, "wet")) 
    16241624    { 
    16251625      websWrite (wp, "<option value=\"8021X\" %s>802.1x</option>\n", 
     
    16571657             "<legend><script type=\"text/javascript\">Capture(share.pintrface)</script> %s SSID [%s] HWAddr [%s]</legend>\n", 
    16581658             prefix, nvram_safe_get (ssid), nvram_safe_get (mac)); 
    1659   show_security_prefix (wp, argc, argv, prefix); 
     1659  show_security_prefix (wp, argc, argv, prefix, 1); 
    16601660  websWrite (wp, "</fieldset>\n<br />\n"); 
    16611661  foreach (var, vifs, next) 
     
    16681668               var, nvram_get (ssid)); 
    16691669    rep (var, '.', 'X'); 
    1670     show_security_prefix (wp, argc, argv, var); 
     1670    show_security_prefix (wp, argc, argv, var, 0); 
    16711671    websWrite (wp, "</fieldset>\n<br />\n"); 
    16721672  } 
Note: See TracChangeset for help on using the changeset viewer.