Use soclose() instead of sofree() when initializing the configuration stack IP.

This commit is contained in:
fengbojiang 2024-09-27 16:25:18 +08:00
parent f95b80ee63
commit 5c144b199a
2 changed files with 5 additions and 5 deletions

View File

@ -115,7 +115,7 @@ int lo_set_defaultaddr(void)
return ret;
ret = ifioctl(so, SIOCAIFADDR, (caddr_t)&req, curthread);
sofree(so);
soclose(so);
return ret;
}

View File

@ -467,7 +467,7 @@ ff_veth_setaddr(struct ff_veth_softc *sc, const char *if_name)
socreate(AF_INET, &so, SOCK_DGRAM, 0, curthread->td_ucred, curthread);
int ret = ifioctl(so, SIOCAIFADDR, (caddr_t)&req, curthread);
sofree(so);
soclose(so);
return ret;
}
@ -548,7 +548,7 @@ ff_veth_setvaddr(struct ff_veth_softc *sc, struct ff_port_cfg *cfg, const char *
}
done:
sofree(so);
soclose(so);
return ret;
}
@ -741,7 +741,7 @@ ff_veth_setaddr6(struct ff_veth_softc *sc, const char *if_name)
socreate(AF_INET6, &so, SOCK_DGRAM, 0, curthread->td_ucred, curthread);
int ret = ifioctl(so, SIOCAIFADDR_IN6, (caddr_t)&ifr6, curthread);
sofree(so);
soclose(so);
return ret;
}
@ -818,7 +818,7 @@ ff_veth_setvaddr6(struct ff_veth_softc *sc, struct ff_port_cfg *cfg, const char
}
done:
sofree(so);
soclose(so);
return ret;
}