Python: Expand bind-to-all-interfaces tests slightly

This commit is contained in:
Rasmus Wriedt Larsen
2021-02-23 14:53:39 +01:00
parent c4cca83019
commit 4026d54095
2 changed files with 10 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
| BindToAllInterfaces_test.py:5:1:5:26 | Attribute() | '0.0.0.0' binds a socket to all interfaces. |
| BindToAllInterfaces_test.py:9:1:9:18 | Attribute() | '' binds a socket to all interfaces. |
| BindToAllInterfaces_test.py:17:1:17:26 | Attribute() | '0.0.0.0' binds a socket to all interfaces. |
| BindToAllInterfaces_test.py:21:1:21:11 | Attribute() | '0.0.0.0' binds a socket to all interfaces. |

View File

@@ -15,3 +15,12 @@ s.bind(('84.68.10.12', 8080))
# binds to all interfaces, insecure
ALL_LOCALS = "0.0.0.0"
s.bind((ALL_LOCALS, 9090))
# binds to all interfaces, insecure
tup = (ALL_LOCALS, 8080)
s.bind(tup)
# IPv6
s = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
s.bind(("::", 8080)) # NOT OK