Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
150c5f5b
Commit
150c5f5b
authored
4 years ago
by
Tim McMullan
Committed by
Tim Wickberg
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use getaddrinfo() for set_slurm_addr().
This will allow us to get IPv6 addresses. Bug 8350.
parent
68a81713
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/common/slurm_protocol_socket.c
+0
-30
0 additions, 30 deletions
src/common/slurm_protocol_socket.c
with
0 additions
and
30 deletions
src/common/slurm_protocol_socket.c
+
0
−
30
View file @
150c5f5b
...
@@ -630,35 +630,6 @@ done:
...
@@ -630,35 +630,6 @@ done:
extern
void
slurm_set_addr
(
slurm_addr_t
*
addr
,
uint16_t
port
,
char
*
host
)
extern
void
slurm_set_addr
(
slurm_addr_t
*
addr
,
uint16_t
port
,
char
*
host
)
{
{
#if 1
/* NOTE: gethostbyname() is obsolete, but the alternative function (below)
* does not work reliably. See bug 2186. */
struct
hostent
*
he
=
NULL
;
int
h_err
=
0
;
char
*
h_buf
[
4096
];
/*
* If NULL hostname passed in, we only update the port of addr
*/
addr
->
sin_family
=
AF_INET
;
addr
->
sin_port
=
htons
(
port
);
if
(
host
==
NULL
)
return
;
he
=
get_host_by_name
(
host
,
(
void
*
)
&
h_buf
,
sizeof
(
h_buf
),
&
h_err
);
if
(
he
!=
NULL
)
memcpy
(
&
addr
->
sin_addr
.
s_addr
,
he
->
h_addr
,
he
->
h_length
);
else
{
error
(
"Unable to resolve
\"
%s
\"
: %s"
,
host
,
hstrerror
(
h_err
));
addr
->
sin_family
=
0
;
addr
->
sin_port
=
0
;
}
return
;
#else
/* NOTE: getaddrinfo() currently does not support aliases and is failing with
* EAGAIN repeatedly in some cases. Comment out this logic until the function
* works as designed. See bug 2186. */
struct
addrinfo
*
addrs
;
struct
addrinfo
*
addrs
;
struct
addrinfo
*
addr_ptr
;
struct
addrinfo
*
addr_ptr
;
...
@@ -688,7 +659,6 @@ extern void slurm_set_addr(slurm_addr_t *addr, uint16_t port, char *host)
...
@@ -688,7 +659,6 @@ extern void slurm_set_addr(slurm_addr_t *addr, uint16_t port, char *host)
if
(
addrs
)
if
(
addrs
)
free_addr_info
(
addrs
);
free_addr_info
(
addrs
);
#endif
}
}
extern
void
slurm_pack_slurm_addr
(
slurm_addr_t
*
addr
,
Buf
buffer
)
extern
void
slurm_pack_slurm_addr
(
slurm_addr_t
*
addr
,
Buf
buffer
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment