Package: ifupdown
Version: 0.8.35
Severity: normal

The man page of ifup(8) under "--all" option claims that "Interfaces are 
brought down in the order in which they are currently listed in the state 
file". However, the "for" loop seen below in read_all_state() function in 
main.c reverses the order of interfaces listed in the state file in case of 
"ifdown -a" or "ifquery --state":

        for (int i = 0; i < ((*n_ifaces) / 2); i++) {
                char *temp = (*ifaces)[i];

                (*ifaces)[i] = (*ifaces)[(*n_ifaces) - i - 1];
                (*ifaces)[(*n_ifaces) - i - 1] = temp;
        }

Perhaps the man page if ifup(8) could be updated? For example:

"Interfaces are brought down in the reversed order in which they
are currently listed in the state file."

..or:

"Interfaces are brought down in the order in which they
are listed in the output of 'ifquery --state'."

I am using Debian GNU/Linux 10, kernel 4.19.0-23-amd64 and libc6 ver 
2.28-10+deb10u2.

Reply via email to