mirror of
https://github.com/wangyu-/udp2raw.git
synced 2025-01-19 14:29:34 +08:00
fixed print of ip address
This commit is contained in:
parent
44fef508a1
commit
0095f1da5c
@ -280,8 +280,9 @@ char * my_ip_t::get_str1() const
|
|||||||
{
|
{
|
||||||
assert(inet_ntop(AF_INET6, &v6, res,max_addr_len)!=0);
|
assert(inet_ntop(AF_INET6, &v6, res,max_addr_len)!=0);
|
||||||
}
|
}
|
||||||
else if(raw_ip_version==AF_INET6)
|
else
|
||||||
{
|
{
|
||||||
|
assert(raw_ip_version==AF_INET);
|
||||||
assert(inet_ntop(AF_INET, &v4, res,max_addr_len)!=0);
|
assert(inet_ntop(AF_INET, &v4, res,max_addr_len)!=0);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
@ -293,8 +294,9 @@ char * my_ip_t::get_str2() const
|
|||||||
{
|
{
|
||||||
assert(inet_ntop(AF_INET6, &v6, res,max_addr_len)!=0);
|
assert(inet_ntop(AF_INET6, &v6, res,max_addr_len)!=0);
|
||||||
}
|
}
|
||||||
else if(raw_ip_version==AF_INET)
|
else
|
||||||
{
|
{
|
||||||
|
assert(raw_ip_version==AF_INET);
|
||||||
assert(inet_ntop(AF_INET, &v4, res,max_addr_len)!=0);
|
assert(inet_ntop(AF_INET, &v4, res,max_addr_len)!=0);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user