master
Desai, Kartikey H 2019-12-18 11:24:00 -05:00 committed by Chris Lenk
parent 32d2a0a4fd
commit e260dbb716
1 changed files with 2 additions and 2 deletions

View File

@ -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")