aboutsummaryrefslogtreecommitdiffstats
path: root/erts/epmd/src/epmd_int.h
diff options
context:
space:
mode:
authorKlas Johansson <[email protected]>2009-12-20 21:13:39 +0100
committerKlas Johansson <[email protected]>2009-12-22 00:16:05 +0100
commita841673669604f5be838a0a0042f05e18ae3827c (patch)
treea19cff3ee74dbcd3fcb507c8681354b3919e48e2 /erts/epmd/src/epmd_int.h
parent4fb050582fa88448f07e9981e4df3cc06237f859 (diff)
downloadotp-a841673669604f5be838a0a0042f05e18ae3827c.tar.gz
otp-a841673669604f5be838a0a0042f05e18ae3827c.tar.bz2
otp-a841673669604f5be838a0a0042f05e18ae3827c.zip
Handle "extra" field according to specs in ALIVE2_REQ and PORT2_RESP.
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".
Diffstat (limited to 'erts/epmd/src/epmd_int.h')
-rw-r--r--erts/epmd/src/epmd_int.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/erts/epmd/src/epmd_int.h b/erts/epmd/src/epmd_int.h
index b120b44579..30f731d49e 100644
--- a/erts/epmd/src/epmd_int.h
+++ b/erts/epmd/src/epmd_int.h
@@ -294,6 +294,7 @@ struct enode {
char protocol; /* 0 = tcp/ipv4 */
unsigned short highvsn; /* 0 = OTP-R3 erts-4.6.x, 1 = OTP-R4 erts-4.7.x*/
unsigned short lowvsn;
+ int extralen;
char extra[MAXSYMLEN+1];
};