File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -940,7 +940,14 @@ const common = {
940940
941941 get hasIPv6 ( ) {
942942 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+ }
944951 return Object . keys ( iFaces ) . some ( ( name ) => {
945952 return re . test ( name ) &&
946953 iFaces [ name ] . some ( ( { family } ) => family === 'IPv6' ) ;
Original file line number Diff line number Diff line change @@ -217,6 +217,10 @@ if (common.hasIPv6) {
217217 assert . strictEqual ( error . message , `connect ECONNREFUSED ::1:${ port } ` ) ;
218218 } else if ( error . code === 'EAFNOSUPPORT' ) {
219219 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 ) ;
220224 } else {
221225 assert . strictEqual ( error . code , 'EADDRNOTAVAIL' ) ;
222226 assert . strictEqual ( error . message , `connect EADDRNOTAVAIL ::1:${ port } - Local (:::0)` ) ;
You can’t perform that action at this time.
0 commit comments