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
32d81be9
Commit
32d81be9
authored
Apr 21, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Transport layer address decoding bug fix
parent
1debd335
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
src/utils/network.cpp
src/utils/network.cpp
+5
-2
No files found.
src/utils/network.cpp
View file @
32d81be9
...
...
@@ -19,10 +19,13 @@
static
std
::
string
OctetStringToIpString
(
const
OctetString
&
address
)
{
if
(
address
.
length
()
!=
4
&&
address
.
length
()
!=
16
)
if
(
address
.
length
()
!=
4
&&
address
.
length
()
!=
16
&&
address
.
length
()
!=
20
)
throw
std
::
runtime_error
(
"Bad Inet address octet string length"
);
int
domain
=
address
.
length
()
==
4
?
AF_INET
:
AF_INET6
;
// (If the length is 20, the address contains IPv4v6 which is 4+16 length. In this case
// we prefer IPv4, and take the first 4 octets.)
int
domain
=
(
address
.
length
()
==
4
||
address
.
length
()
==
20
)
?
AF_INET
:
AF_INET6
;
unsigned
char
buf
[
sizeof
(
struct
in6_addr
)]
=
{
0
};
char
str
[
INET6_ADDRSTRLEN
]
=
{
0
};
...
...
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