File tree 2 files changed +15
-3
lines changed
2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -461,9 +461,9 @@ def _normPyStr(self, valu):
461
461
portstr = f':{ port } '
462
462
463
463
elif self .defport :
464
- subs ['port' ] = self .port
465
- virts ['port' ] = (self .port , self .porttype .stortype )
466
- portstr = f':{ self .port } '
464
+ subs ['port' ] = self .defport
465
+ virts ['port' ] = (self .defport , self .porttype .stortype )
466
+ portstr = f':{ self .defport } '
467
467
468
468
return f'{ proto } ://[{ host } ]{ portstr } ' , {'subs' : subs , 'virts' : virts }
469
469
@@ -475,6 +475,12 @@ def _normPyStr(self, valu):
475
475
host = self .iptype .repr (ipv6 )
476
476
subs ['ip' ] = ipv6
477
477
virts ['ip' ] = (ipv6 , self .iptype .stortype )
478
+
479
+ if self .defport :
480
+ subs ['port' ] = self .defport
481
+ virts ['port' ] = (self .defport , self .porttype .stortype )
482
+ return f'{ proto } ://[{ host } ]:{ self .defport } ' , {'subs' : subs , 'virts' : virts }
483
+
478
484
return f'{ proto } ://{ host } ' , {'subs' : subs , 'virts' : virts }
479
485
480
486
# Otherwise treat as IPv4
Original file line number Diff line number Diff line change @@ -1358,6 +1358,12 @@ async def test_server(self):
1358
1358
nodes = await core .nodes ('[ it:network=* :dns:resolvers=(([6, 1]),)]' )
1359
1359
self .eq (nodes [0 ].get ('dns:resolvers' ), ('udp://[::1]:53' ,))
1360
1360
1361
+ nodes = await core .nodes ('[ it:network=* :dns:resolvers=("::1",)]' )
1362
+ self .eq (nodes [0 ].get ('dns:resolvers' ), ('udp://[::1]:53' ,))
1363
+
1364
+ nodes = await core .nodes ('[ it:network=* :dns:resolvers=("[::1]",)]' )
1365
+ self .eq (nodes [0 ].get ('dns:resolvers' ), ('udp://[::1]:53' ,))
1366
+
1361
1367
async def test_servfile (self ):
1362
1368
async with self .getTestCore () as core :
1363
1369
valu = ('tcp://127.0.0.1:4040' , 64 * 'f' )
You can’t perform that action at this time.
0 commit comments