Really fix the auto keyword botch correctly by just letting it

do its job and not override it when set.

Submitted by:		Ruslan Ermilov <ru@FreeBSD.org>
This commit is contained in:
Jordan K. Hubbard 1999-10-05 10:10:42 +00:00
parent 85e244dbfa
commit 0ec4416c55
2 changed files with 4 additions and 4 deletions

View File

@ -391,10 +391,10 @@ tcpOpenDialog(Device *devp)
sprintf(temp, "inet %s %s netmask %s", ipaddr, extras, netmask);
variable_set2(ifn, temp, 1);
ifaces = variable_get(VAR_INTERFACES);
if (!ifaces || !strcmp(ifaces, "auto"))
if (!ifaces)
variable_set2(VAR_INTERFACES, ifaces = "lo0", 1);
/* Only add it if it's not there already */
if (!strstr(ifaces, devp->name)) {
if (strcmp(ifaces, "auto") && !strstr(ifaces, devp->name)) {
sprintf(ifn, "%s %s", devp->name, ifaces);
variable_set2(VAR_INTERFACES, ifn, 1);
}

View File

@ -391,10 +391,10 @@ tcpOpenDialog(Device *devp)
sprintf(temp, "inet %s %s netmask %s", ipaddr, extras, netmask);
variable_set2(ifn, temp, 1);
ifaces = variable_get(VAR_INTERFACES);
if (!ifaces || !strcmp(ifaces, "auto"))
if (!ifaces)
variable_set2(VAR_INTERFACES, ifaces = "lo0", 1);
/* Only add it if it's not there already */
if (!strstr(ifaces, devp->name)) {
if (strcmp(ifaces, "auto") && !strstr(ifaces, devp->name)) {
sprintf(ifn, "%s %s", devp->name, ifaces);
variable_set2(VAR_INTERFACES, ifn, 1);
}