File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -940,7 +940,14 @@ const common = {
940
940
941
941
get hasIPv6 ( ) {
942
942
const iFaces = require ( 'os' ) . networkInterfaces ( ) ;
943
- const re = isWindows ? / L o o p b a c k P s e u d o - I n t e r f a c e / : / l o / ;
943
+ let re ;
944
+ if ( isWindows ) {
945
+ re = / L o o p b a c k P s e u d o - I n t e r f a c e / ;
946
+ } else if ( this . isIBMi ) {
947
+ re = / \* L O O P B A C K / ;
948
+ } else {
949
+ re = / l o / ;
950
+ }
944
951
return Object . keys ( iFaces ) . some ( ( name ) => {
945
952
return re . test ( name ) &&
946
953
iFaces [ name ] . some ( ( { family } ) => family === 'IPv6' ) ;
Original file line number Diff line number Diff line change @@ -217,6 +217,10 @@ if (common.hasIPv6) {
217
217
assert . strictEqual ( error . message , `connect ECONNREFUSED ::1:${ port } ` ) ;
218
218
} else if ( error . code === 'EAFNOSUPPORT' ) {
219
219
assert . strictEqual ( error . message , `connect EAFNOSUPPORT ::1:${ port } - Local (undefined:undefined)` ) ;
220
+ } else if ( common . isIBMi ) {
221
+ // IBMi returns EUNATCH (ERRNO 42) when IPv6 is disabled
222
+ // keep this errno assertion until EUNATCH is recognized by libuv
223
+ assert . strictEqual ( error . errno , - 42 ) ;
220
224
} else {
221
225
assert . strictEqual ( error . code , 'EADDRNOTAVAIL' ) ;
222
226
assert . strictEqual ( error . message , `connect EADDRNOTAVAIL ::1:${ port } - Local (:::0)` ) ;
You can’t perform that action at this time.
0 commit comments