diff options
| author | Garrett D'Amore <garrett@damore.org> | 2020-01-20 23:31:55 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2020-01-20 23:35:08 -0800 |
| commit | 38c005e7c07b5ccaab3345dc8c66cbc27b95692a (patch) | |
| tree | 7d35c74df9f0f320942e6c8c601e963a4cc11741 /src/protocol/reqrep0/xrep.c | |
| parent | 058ad941dc55ad6288f6b07f4cdf237fd13f1a93 (diff) | |
| download | nng-38c005e7c07b5ccaab3345dc8c66cbc27b95692a.tar.gz nng-38c005e7c07b5ccaab3345dc8c66cbc27b95692a.tar.bz2 nng-38c005e7c07b5ccaab3345dc8c66cbc27b95692a.zip | |
fixes #1169 survey and xsurvey could use message cloning
fixes #1160 Consider limiting maximum hop count to 15
fixes #1098 Maximum maxTTL should be compile time defined
This doesn't expose the max-MaxTTL in the CMakeList.txt -- there
is really no reason anyone should be changing it. This does not
yet inline the message header into the nni_msg_t, but it is my
intention to do so soon, and eliminate most of the conditional cases
for failure on inserting into the header.
Diffstat (limited to 'src/protocol/reqrep0/xrep.c')
| -rw-r--r-- | src/protocol/reqrep0/xrep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/protocol/reqrep0/xrep.c b/src/protocol/reqrep0/xrep.c index e63cfe83..901cecc4 100644 --- a/src/protocol/reqrep0/xrep.c +++ b/src/protocol/reqrep0/xrep.c @@ -355,7 +355,7 @@ xrep0_sock_set_maxttl(void *arg, const void *buf, size_t sz, nni_opt_type t) xrep0_sock *s = arg; int ttl; int rv; - if ((rv = nni_copyin_int(&ttl, buf, sz, 1, 255, t)) == 0) { + if ((rv = nni_copyin_int(&ttl, buf, sz, 1, NNI_MAX_MAX_TTL, t)) == 0) { nni_atomic_set(&s->ttl, ttl); } return (rv); |
