Fixes #309
parent
32d2a0a4fd
commit
e260dbb716
|
@ -598,9 +598,9 @@ class SocketExt(_Extension):
|
|||
options = self.get('options')
|
||||
|
||||
if options is not None:
|
||||
acceptable_prefixes = ["SO", "ICMP", "ICMP6", "IP", "IPV6", "MCAST", "TCP", "IRLMP"]
|
||||
acceptable_prefixes = ["SO_", "ICMP_", "ICMP6_", "IP_", "IPV6_", "MCAST_", "TCP_", "IRLMP_"]
|
||||
for key, val in options.items():
|
||||
if key[:key.find('_')] not in acceptable_prefixes:
|
||||
if key[:key.find('_') + 1] not in acceptable_prefixes:
|
||||
raise ValueError("Incorrect options key")
|
||||
if not isinstance(val, int):
|
||||
raise ValueError("Options value must be an integer")
|
||||
|
|
Loading…
Reference in New Issue