Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
UERANSIM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
UERANSIM
Commits
27262cba
Commit
27262cba
authored
Dec 07, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IP resolution bug fix
parent
f74badf4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
src/utils/network.cpp
src/utils/network.cpp
+2
-8
No files found.
src/utils/network.cpp
View file @
27262cba
...
@@ -32,15 +32,9 @@ static std::string OctetStringToIpString(const OctetString &address)
...
@@ -32,15 +32,9 @@ static std::string OctetStringToIpString(const OctetString &address)
char
str
[
INET6_ADDRSTRLEN
]
=
{
0
};
char
str
[
INET6_ADDRSTRLEN
]
=
{
0
};
if
(
domain
==
AF_INET
)
if
(
domain
==
AF_INET
)
{
std
::
memcpy
(
buf
,
address
.
data
(),
4
);
auto
*
p
=
reinterpret_cast
<
in_addr
*>
(
buf
);
p
->
s_addr
=
(
in_addr_t
)
octet4
{
address
.
data
()[
0
],
address
.
data
()[
1
],
address
.
data
()[
2
],
address
.
data
()[
3
]};
}
else
else
{
std
::
memcpy
(
buf
,
address
.
data
(),
16
);
auto
*
p
=
reinterpret_cast
<
in6_addr
*>
(
buf
);
std
::
memcpy
(
p
,
address
.
data
(),
16
);
}
if
(
inet_ntop
(
domain
,
buf
,
str
,
INET6_ADDRSTRLEN
)
==
nullptr
)
if
(
inet_ntop
(
domain
,
buf
,
str
,
INET6_ADDRSTRLEN
)
==
nullptr
)
throw
LibError
(
"Bad Inet address, inet_ntop failure:"
,
errno
);
throw
LibError
(
"Bad Inet address, inet_ntop failure:"
,
errno
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment