only support FreeBSD 10+

This commit is contained in:
Zack B 2014-07-01 15:08:42 -07:00
parent 2704963e61
commit e601ade924
2 changed files with 2 additions and 2 deletions

View File

@ -7,6 +7,6 @@ if sys.platform == "linux2":
elif sys.platform == "darwin": elif sys.platform == "darwin":
import osx import osx
resolver = osx.Resolver resolver = osx.Resolver
elif "freebsd" in sys.platform: elif sys.platform == "freebsd10":
import osx import osx
resolver = osx.Resolver resolver = osx.Resolver

View File

@ -12,7 +12,7 @@ def lookup(address, port, s):
if "ESTABLISHED:ESTABLISHED" in i and spec in i: if "ESTABLISHED:ESTABLISHED" in i and spec in i:
s = i.split() s = i.split()
if len(s) > 4: if len(s) > 4:
if "freebsd" in sys.platform: if sys.platform == "freebsd10":
# strip parentheses for FreeBSD pfctl # strip parentheses for FreeBSD pfctl
s = s[3][1:-1].split(":") s = s[3][1:-1].split(":")
else: else: