"The field "rstats_path" is invalid..." error message on TomatoUSB (bug)

Discussion in 'Tomato Firmware' started by supercheetah, Dec 17, 2011.

  1. supercheetah

    supercheetah Networkin' Nut Member

    I tried reporting this bug to TomatoUSB, but it seems they've restricted posts to their forum, and I get the message that guests and low-karma users can't post.

    Anyway, I'm posting this here in case anyone else runs into the issue, and needs to know how to work around it.

    I was trying to have Tomato back up its bandwidth monitoring log files to a custom path, but I was getting the error message, 'The field "rstats_path" is invalid. Please report this problem.' To say the least, I had no idea what was going on initially, so I began searching on Google, which lead me to the filesource/119vic8850/src/router/httpd/tomato.cin the source code, and to the following in the source code:

    static int save_variables(int write)
            /* ...vars... */
            char s[256];
            int dirty;
            static const char *msgf = "The field \"%s\" is invalid. Please report this problem.";
            /* ... code ... */
            for (n = 0; n < 50; ++n) {
                sprintf(s, "rrule%d", n);
                if ((p = webcgi_get(s)) != NULL) {
                    if (strlen(p) > 2048) {
                                    sprintf(s, msgf, s);
                                    return 0;
                            if ((write) && (!nvram_match(s, p))) {
                                    dirty = 1;
                                    nvram_set(s, p);
    I realized that my custom path was too long (it needs to be less than 256 characters long in length), so I modified it and it started working, but the error message did not give me any clue as to what was going on.
  2. shibby20

    shibby20 Network Guru Member

    i have rstats_path set as /opt/log/stats/ and it works great. Directory 'stats' have to exists - You have to remember on that.
  3. supercheetah

    supercheetah Networkin' Nut Member

    It does exist, but the path also has to be less than 256 characters. If it's longer than that, tomato will give the above error.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice