GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||
GeezerVison is showing github.com — dns: implement {ttl: true} for dns.resolve4() and dns.resolve6() by bnoordhuis · Pull Request #9296 · nodejs/node Conversation
Member
See discussion in #5893 and other issues. We can retrieve the TTL for A and AAAA records looked up through the I'll write up documentation and nice commit logs if we decide this is something we want to do. Example output:
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
How about also supporting a 4-argument signature of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I thought about that but I decided to punt on what to do when someone requests the TTL for a non-A/AAAA record. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I could also see the second argument to it being made a object, so we support two signatures:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sure, but we'd still need to come up with a policy for dealing with bad inputs: throw, ignore, log a warning, something else. I figured it's easier to just sidestep the issue and leave |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'm a bit -1 on the two signature approach. Perhaps an |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Yes, that's my plan. Currently the second argument is only accepted as a string. We can simply typecheck if it's string or object, and throw otherwise. Having object support in all |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@bnoordhuis I think it'd be better if we just go all the way and add TTL support to all methods. Having only the A/AAAA shorthands support it would be quite confusing. What are you exactly worried about regarding input validation? Looks to be a simple case of string/object check and throw otherwise. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
We can't add TTL support for all methods because c-ares only supports it for A and AAAA records. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Oh dang, didn't realize that stupid limitation. In that case I guess you found a good compromise. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Updated with documentation and pretty commit logs, PTAL. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Add an option to retrieve the Time-To-Live of the A record. PR-URL: nodejs#9296 Refs: nodejs#5893 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
Add an option to retrieve the Time-To-Live of the AAAA record. PR-URL: nodejs#9296 Refs: nodejs#5893 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
Add an option to retrieve the Time-To-Live of the A record. PR-URL: #9296 Refs: #5893 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
Add an option to retrieve the Time-To-Live of the AAAA record. PR-URL: #9296 Refs: #5893 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
Notable changes: * crypto: The `Decipher` methods `setAuthTag()` and `setAAD` now return `this`. (Kirill Fomichev) #9398 * dns: Implemented `{ttl: true}` for `resolve4()` and `resolve6()`. (Ben Noordhuis) #9296 & #9296 * libuv: Upgrade to v1.10.1 (cjihrig) #9647 * process: Added a new `external` property to the data returned by `memoryUsage()`. (Fedor Indutny) #9587 * V8 (dep): Upgrade to v5.4.500.43 (Michaël Zasso) #9697 * v8: The data returned by `getHeapStatistics()` now includes three new fields: `malloced_memory`, `peak_malloced_memory`, and `does_zap_garbage`. (Gareth Ellis) #8610 PR-URL: #9745
This is a security release impacting Windows 10 users. Notable changes: * crypto: The `Decipher` methods `setAuthTag()` and `setAAD` now return `this`. (Kirill Fomichev) #9398 * dns: Implemented `{ttl: true}` for `resolve4()` and `resolve6()`. (Ben Noordhuis) #9296 & #9296 * libuv: Upgrade to v1.10.1 (cjihrig) #9647 - Fixed a potential buffer overflow when writing data to console on Windows 10. (CVE-2016-9551) * process: Added a new `external` property to the data returned by `memoryUsage()`. (Fedor Indutny) #9587 * tls: Fixed a memory leak when writes were queued on TLS connection that was destroyed during handshake. (Fedor Indutny) #9626 * V8 (dep): Upgrade to v5.4.500.43 (Michaël Zasso) #9697 * v8: The data returned by `getHeapStatistics()` now includes three new fields: `malloced_memory`, `peak_malloced_memory`, and `does_zap_garbage`. (Gareth Ellis) #8610 PR-URL: #9745
This is a security release impacting Windows 10 users.
Notable changes:
* crypto: The `Decipher` methods `setAuthTag()` and `setAAD` now return
`this`. (Kirill Fomichev) nodejs/node#9398
* dns: Implemented `{ttl: true}` for `resolve4()` and `resolve6()`.
(Ben Noordhuis) nodejs/node#9296 &
nodejs/node#9296
* libuv: Upgrade to v1.10.1 (cjihrig)
nodejs/node#9647
- Fixed a potential buffer overflow when writing data to console on
Windows 10. (CVE-2016-9551)
* process: Added a new `external` property to the data returned by
`memoryUsage()`. (Fedor Indutny)
nodejs/node#9587
* tls: Fixed a memory leak when writes were queued on TLS connection
that was destroyed during handshake. (Fedor Indutny)
nodejs/node#9626
* V8 (dep): Upgrade to v5.4.500.43 (Michaël Zasso)
nodejs/node#9697
* v8: The data returned by `getHeapStatistics()` now includes three new
fields: `malloced_memory`, `peak_malloced_memory`, and
`does_zap_garbage`. (Gareth Ellis)
nodejs/node#8610
Signed-off-by: Ilkka Myller <[email protected]>
Add an option to retrieve the Time-To-Live of the A record. PR-URL: #9296 Refs: #5893 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
Add an option to retrieve the Time-To-Live of the AAAA record. PR-URL: #9296 Refs: #5893 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
Add an option to retrieve the Time-To-Live of the A record. PR-URL: #9296 Refs: #5893 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
Add an option to retrieve the Time-To-Live of the AAAA record. PR-URL: #9296 Refs: #5893 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
|
Is this ever going to be backported to node 6 ? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@tommarien That this has gotten the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@addaleax That would be marvellous ;) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This LTS release comes with 126 commits. This includes 40 which
are test related, 32 which are doc related, 12 which are
build / tool related and 4 commits which are updates to
dependencies.
Notable Changes:
* build:
- support for building mips64el (nanxiongchao)
#10991
* cluster:
- disconnect() now returns a reference to the disconnected
worker. (Sean Villars)
#10019
* crypto:
- ability to select cert store at runtime (Adam Majer)
#8334
- Use system CAs instead of using bundled ones (Adam Majer)
#8334
- The `Decipher` methods `setAuthTag()` and `setAAD` now return
`this`. (Kirill Fomichev)
#9398
- adding support for OPENSSL_CONF again (Sam Roberts)
#11006
- make LazyTransform compabile with Streams1 (Matteo Collina)
#12380
* deps:
- upgrade libuv to 1.11.0 (cjihrig)
#11094
- upgrade libuv to 1.10.2 (cjihrig)
#10717
- upgrade libuv to 1.10.1 (cjihrig)
#9647
- upgrade libuv to 1.10.0 (cjihrig)
#9267
* dns:
- Implemented `{ttl: true}` for `resolve4()` and `resolve6()`
(Ben Noordhuis)
#9296
* process:
- add NODE_NO_WARNINGS environment variable (cjihrig)
#10842
* readline:
- add option to stop duplicates in history (Danny Nemer)
#2982
* src:
- support "--" after "-e" as end-of-options (John Barboza)
#10651
* tls:
- new tls.TLSSocket() supports sec ctx options (Sam Roberts)
#11005
- Allow obvious key/passphrase combinations. (Sam Roberts)
#10294
PR-URL: #13059
This LTS release comes with 126 commits. This includes 40 which
are test related, 32 which are doc related, 12 which are
build / tool related and 4 commits which are updates to
dependencies.
Notable Changes:
* build:
- support for building mips64el (nanxiongchao)
#10991
* cluster:
- disconnect() now returns a reference to the disconnected
worker. (Sean Villars)
#10019
* crypto:
- ability to select cert store at runtime (Adam Majer)
#8334
- Use system CAs instead of using bundled ones (Adam Majer)
#8334
- The `Decipher` methods `setAuthTag()` and `setAAD` now return
`this`. (Kirill Fomichev)
#9398
- adding support for OPENSSL_CONF again (Sam Roberts)
#11006
- make LazyTransform compabile with Streams1 (Matteo Collina)
#12380
* deps:
- upgrade libuv to 1.11.0 (cjihrig)
#11094
- upgrade libuv to 1.10.2 (cjihrig)
#10717
- upgrade libuv to 1.10.1 (cjihrig)
#9647
- upgrade libuv to 1.10.0 (cjihrig)
#9267
* dns:
- Implemented `{ttl: true}` for `resolve4()` and `resolve6()`
(Ben Noordhuis)
#9296
* process:
- add NODE_NO_WARNINGS environment variable (cjihrig)
#10842
* readline:
- add option to stop duplicates in history (Danny Nemer)
#2982
* src:
- support "--" after "-e" as end-of-options (John Barboza)
#10651
* tls:
- new tls.TLSSocket() supports sec ctx options (Sam Roberts)
#11005
- Allow obvious key/passphrase combinations. (Sam Roberts)
#10294
PR-URL: #13059
|
Any reason why we decided to not land it on v4? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Another sincere question, how to use this code on both v6.11.0 and v6.10.0 😉? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Mostly because Node 4 is already in maintenance mode, and no-one was pushing really strongly for it. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@indutny we are not doing minors for 4 after maintenance mode. There is no way to run it on 6.10.0 without manually landing the patch yourself |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@MylesBorins yeah, it is too late to ask for v4 indeed. I was just curious why it didn't get there in November 2016, when the change landed in master. As for |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Erm, perhaps I phrased it wrong. I mean that |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It didn't get in earlier because no one asked for it... the minors are primarily done based on commits that people request backports of. We ended up including this in 6.11 due to this. Not really sure a better way to handle this for 6.10.0... definitely a valid point regarding new apis throwing on older versions. This is something we should keep in mind for future minors |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Add an option to retrieve the Time-To-Live of the A record. PR-URL: nodejs/node#9296 Refs: nodejs/node#5893 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
Add an option to retrieve the Time-To-Live of the AAAA record. PR-URL: nodejs/node#9296 Refs: nodejs/node#5893 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
This LTS release comes with 126 commits. This includes 40 which
are test related, 32 which are doc related, 12 which are
build / tool related and 4 commits which are updates to
dependencies.
Notable Changes:
* build:
- support for building mips64el (nanxiongchao)
nodejs/node#10991
* cluster:
- disconnect() now returns a reference to the disconnected
worker. (Sean Villars)
nodejs/node#10019
* crypto:
- ability to select cert store at runtime (Adam Majer)
nodejs/node#8334
- Use system CAs instead of using bundled ones (Adam Majer)
nodejs/node#8334
- The `Decipher` methods `setAuthTag()` and `setAAD` now return
`this`. (Kirill Fomichev)
nodejs/node#9398
- adding support for OPENSSL_CONF again (Sam Roberts)
nodejs/node#11006
- make LazyTransform compabile with Streams1 (Matteo Collina)
nodejs/node#12380
* deps:
- upgrade libuv to 1.11.0 (cjihrig)
nodejs/node#11094
- upgrade libuv to 1.10.2 (cjihrig)
nodejs/node#10717
- upgrade libuv to 1.10.1 (cjihrig)
nodejs/node#9647
- upgrade libuv to 1.10.0 (cjihrig)
nodejs/node#9267
* dns:
- Implemented `{ttl: true}` for `resolve4()` and `resolve6()`
(Ben Noordhuis)
nodejs/node#9296
* process:
- add NODE_NO_WARNINGS environment variable (cjihrig)
nodejs/node#10842
* readline:
- add option to stop duplicates in history (Danny Nemer)
nodejs/node#2982
* src:
- support "--" after "-e" as end-of-options (John Barboza)
nodejs/node#10651
* tls:
- new tls.TLSSocket() supports sec ctx options (Sam Roberts)
nodejs/node#11005
- Allow obvious key/passphrase combinations. (Sam Roberts)
nodejs/node#10294
PR-URL: nodejs/node#13059
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.