Age | Commit message (Collapse) | Author |
|
This reverts commit bd8f6106d44a58c261920eef72842bb3bc5a4968.
PLUS a little change in epmd_srv.c:750 ("4" -> "replylen")
that was part of e2cf4a8a4b03b9f430ba228276c3b2629159e832
by mistake.
|
|
* Increase distribution version from 5 to 6
* Introduce new ALIVE2_X_RESP with 32-bit creation
as reply to ALIVE2_REQ when sender dist version >= 6
* Still reply old ALIVE2_RESP with tiny creation 1..3
if sender dist version < 6.
|
|
|
|
* binarin/erts/fix-epmd-systemd-notifications/PR-999/OTP-13493:
Don't send unasked for systemd notifications
|
|
Suppose we have some erlang system that uses systemd unit with
Type=notify - so this should send startup confirmation itself. But if
systemd-enabled epmd will be started as a first step of that system
startup, empd startup confirmation will be misinterpeted by systemd. And
our erlang service will be considered 'ready' to early. Also this will
interefere with systemd MAINPID detection: systemd will be monitoring
`epmd` process instead of `beam` one.
For example, rabbitmq works around this issue by starting epmd using
separate short-lived beam process, with NOTIFY_SOCKET environment
variable reset - only in this way we could be sure that epmd will not
interfere with rabbit startup sequence.
This patch disables indiscriminate confirmation sending, and does it
only when it was explicitly asked to do so.
|
|
|
|
|
|
Patch from end of PR 864
Fixes problem reported in the PR by jeckersb
In this error case, a negative file descriptor is now saved at
listensock[i], which leads to a buffer overflow later on at
https://github.com/msantos/otp/blob/epmd-IPv6-node-reg2/erts/epmd/src/epmd_srv.c#L498
when calling FD_ISSET(listensock[i],&read_mask).
To reproduce this:
Completely disable IPv6 with ipv6.disable=1 on the kernel command line
Build with fortified code (RHEL/CentOS default): CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fno-strict-aliasing'
|
|
|
|
Allow IPv6 nodes to register with and query epmd. On systems with
IPv6 support:
* epmd listens on both the IPv4 and IPv6 ANY or loopback sockets
* the epmd cli client connects to epmd over the IPv6 loopback
* distributed nodes started with "-proto_dist inet6_tcp" will register
with epmd over IPv6
To work on IPv6 capable systems that have IPv6 support disabled,
epmd ignores errors opening the socket if the protocol is not
supported. Similarly, the epmd client will fall back to IPv4 if the IPv6
socket is not available.
Update the minimum supported version of Windows to Windows Vista to
support IPv6.
|
|
|
|
* binarin/epmd-race:
Prevent down nodes going undetected in epmd
OTP-13301
|
|
|
|
In the following (rare) case down node will be always registered in epmd:
- client connects to epmd and sends ALIVE2 request
- epmd reads this request and starts to process it
- during that time client socket closes in such way that subsequent
write(2) in epmd will result in error
- at this point we have node that was registered in database, but as
the connection struct has no 'keep' flag set, the do_read() closes
connection and removes it from select fdset - and so there is no way
for this node to be cleaned up later.
We've seen several epmd instances in such state on our production
systems. And while I'm not sure what was the exact sequence of events
that leads to failed write(2), issue could be easily reproduced using
SO_LINGER option for socket.
|
|
This happens only during processing ALIVE2 request. reply() already
performs the same delay as in the deleted code.
|
|
The OSE port is no longer supported and this commit removed it
and any changes related to it. The things that were general
improvements have been left in the code.
|
|
|
|
Don't use both HAVE_SYSTEMD_DAEMON and HAVE_SYSTEMD_SD_DAEMON - use only
the former one and remove the latter one entirely.
Signed-off-by: Peter Lemenkov <[email protected]>
|
|
Signed-off-by: Peter Lemenkov <[email protected]>
|
|
* Check of atomics on bsd
* Add --enable-systemd for epmd
* Remove unused --enable-tsp option
|
|
* matwey/systemd/OTP-11829:
Add systemd socket activation for epmd.
Conflicts:
erts/epmd/src/epmd_int.h
Extra ticket: OTP-11828
|
|
This port has support for both non-smp and smp.
It contains a new way to do io checking in which erts_poll_wait
receives the payload of the polled entity. This has implications
for all linked-in drivers.
|
|
Check for systemd libraries and headers in confgiure.
Add -systemd option enabling waiting for sockets from systemd.
|
|
|
|
|
|
|
|
If the environment variable ERL_EPMD_ADDRESS is set to the empty string,
empd now behaves like it does by default when ERL_EPMD_ADDRESS is unset.
That is, in this case, epmd now listens on all available interfaces
instead of using only the loopback interface, which happened because
epmd added the loopback address to the (in this case empty) list of
addresses specified via ERL_EPMD_ADDRESS.
Also, epmd now ignores ERL_EPMD_ADDRESS if it contains only separator
characters (comma and space).
The same applies to epmd's -address option.
|
|
The first argument g->max_conn to select() in epmd_srv.c seems to be
wrong as it excludes the listening socket(s). Instead we keep track of
the highest fd seen.
However I still don't understand why select() started to fail for
vxworks with R14B03 when the feature of more than one listening socket
was introduced. The default is still 1 listening socket (num_sockets=1),
which would make the first argument to select() unchanged.
|
|
* ms/epmd-local-access-check:
epmd: include host address in local access check
OTP-9214
|
|
* hw/epmd-bind-to-address:
Allow user to specify the IP address epmd binds to
OTP-9213
|
|
|
|
The listen() call can fail due to a variety of conditions, so check
its return value and if it fails, print a suitable debug message if
appropriate and then exit. The exit values used are the same for those
already used for bind() failures: 0 if the error is EADDRINUSE, 1
otherwise.
|
|
In FreeBSD jails, the source and destination address of connections
to localhost are changed to be the IP address of the jail. Consider
connections from the host's IP address to itself (e.g., the source and
destination address match) to be local for the access control checks.
Reported-By: [email protected]
|
|
The IP address(es) epmd binds to can now be specified by the user,
either via epmd's new "-address" option or (if that's not used) by
setting the environment variable ERL_EPMD_ADDRESS. Multiple addresses
may be specified using a comma-separated list. If the loopback address
is not in this list, it will be added implicitly, so that the daemon can
be queried by an interactive epmd process.
|
|
With newer releases erts/emulator/internal_doc/erl_ext_dist.txt just
forwards the reader to the ERTS User's Guide. Adjust the comment in
epmd_srv.c to point to this location too.
Signed-off-by: Ralf Doering <[email protected]>
|
|
|
|
|
|
Use erts_(v)snprintf to ensure no buffer overruns in debug printouts.
Disallow everything except port and name requests from remote nodes.
Disallow kill command even from localhost if alive nodes exist.
-relaxed_command_check when starting epmd returns the possibility to
kill this epmd when nodes are alive (from localhost).
Disallow stop command completely except if -relaxed_command_check is given
when epmd was started.
Environment variable ERL_EPMD_RELAXED_COMMAND_CHECK can be set to always get
-relaxed_command_check.
|
|
|
|
|
|
|
|
Check errno if either select() or accept() returns an error and exit.
This prevents epmd from looping and taking up 100% CPU.
|
|
|
|
* kj/epmd-port2resp-trunc-extra:
Handle "extra" field according to specs in ALIVE2_REQ and PORT2_RESP.
OTP-8361 EPMD now correctly handles the extra data field which can be
given in the ALIVE2_REQ request and retrieved in the PORT2_RESP
response. (Thanks to Klas Johansson.)
|
|
Don't let the length field pollute the value of the "extra" field in
ALIVE2_REQ. Extra was read, starting at the second byte of the two
byte length field, which meant that it was included in the result and
the last byte of the value was skipped:
if "extra" is <<1, 2>>, return <<0, 2, 1, 2>> not <<0, 2, 2, 1>>
Increment the offset correctly when sending PORT2_RESP, in order to
make sure the "extra" field won't be truncated:
if "extra" is <<>>, return <<0, 0>> not <<0>>
if "extra" is <<1, 2>>, return <<0, 2, 1, 2>> not <<0, 2, 1>>
Allow null characters in "extra".
|
|
|