mirror of
https://github.com/aramperes/onetun.git
synced 2025-09-09 06:38:32 -04:00
Change the error message from host to bind
This commit is contained in:
parent
9bd7ec2cca
commit
4162f62ae6
1 changed files with 2 additions and 2 deletions
|
@ -236,8 +236,8 @@ impl Config {
|
||||||
.with_context(|| "Invalid endpoint address")?;
|
.with_context(|| "Invalid endpoint address")?;
|
||||||
|
|
||||||
let endpoint_bind_addr = if let Some(addr) = matches.value_of("endpoint-bind-addr") {
|
let endpoint_bind_addr = if let Some(addr) = matches.value_of("endpoint-bind-addr") {
|
||||||
let addr = parse_addr(Some(addr)).with_context(|| "Invalid host address")?;
|
let addr = parse_addr(Some(addr)).with_context(|| "Invalid bind address")?;
|
||||||
// Make sure the host address and endpoint address are the same IP version
|
// Make sure the bind address and endpoint address are the same IP version
|
||||||
if addr.ip().is_ipv4() != endpoint_addr.ip().is_ipv4() {
|
if addr.ip().is_ipv4() != endpoint_addr.ip().is_ipv4() {
|
||||||
return Err(anyhow::anyhow!(
|
return Err(anyhow::anyhow!(
|
||||||
"Endpoint and bind addresses must be the same IP version"
|
"Endpoint and bind addresses must be the same IP version"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue