Commit 8af4bb8
committed
dgram: default send address to 127.0.0.1 or ::1
In net we default to 'localhost' as the default address for connect.
Not doing the same on dgram is confusing, because sending to 0.0.0.0
works on Linux/OS X but not on Windows. Defaulting that to 127.0.0.1 /
::1 addresses that.
Related: #5407
Related: #5398
Fixes: #5487
PR-URL: #5493
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>1 parent a37401e commit 8af4bb8Copy full SHA for 8af4bb8
File tree
Expand file treeCollapse file tree
4 files changed
+46
-18
lines changedOpen diff view settings
Filter options
- doc/api
- lib
- test/parallel
Expand file treeCollapse file tree
4 files changed
+46
-18
lines changedOpen diff view settings
Collapse file
+1-4Lines changed: 1 addition & 4 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
209 | 209 | |
210 | 210 | |
211 | 211 | |
212 | | - |
213 | | - |
214 | | - |
215 | | - |
| 212 | + |
216 | 213 | |
217 | 214 | |
218 | 215 | |
|
Collapse file
+9-2Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
29 | 29 | |
30 | 30 | |
31 | 31 | |
32 | | - |
| 32 | + |
33 | 33 | |
34 | 34 | |
35 | 35 | |
36 | 36 | |
37 | | - |
| 37 | + |
38 | 38 | |
39 | 39 | |
40 | 40 | |
| ||
166 | 166 | |
167 | 167 | |
168 | 168 | |
| 169 | + |
| 170 | + |
| 171 | + |
| 172 | + |
| 173 | + |
| 174 | + |
| 175 | + |
169 | 176 | |
170 | 177 | |
171 | 178 | |
|
Collapse file
test/parallel/test-dgram-send-default-host.js
Copy file name to clipboardExpand all lines: test/parallel/test-dgram-send-default-host.js-12Lines changed: 0 additions & 12 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4 | 4 | |
5 | 5 | |
6 | 6 | |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | | - |
13 | | - |
14 | 7 | |
15 | 8 | |
16 | | - |
17 | | - |
18 | | - |
19 | | - |
20 | 9 | |
21 | 10 | |
22 | 11 | |
| ||
36 | 25 | |
37 | 26 | |
38 | 27 | |
39 | | - |
40 | 28 | |
41 | 29 | |
42 | 30 | |
|
Collapse file
test/parallel/test-dgram-udp6-send-default-host.js
Copy file name to clipboard+36Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
0 commit comments