mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 17:12:13 -06:00
improve avahi-379 workaround
This commit is contained in:
parent
6c1cf68bca
commit
94d1924fa9
|
@ -21,12 +21,10 @@ def set_avahi_379():
|
|||
|
||||
def log_avahi_379(args):
|
||||
global avahi_379
|
||||
n = avahi_379
|
||||
if n == 2:
|
||||
if avahi_379 == 2:
|
||||
return
|
||||
if n == 1:
|
||||
avahi_379 = 2
|
||||
t = "Invalid pointer in DNSLabel [offset=%d,pointer=%d,length=%d]; this is probably avahi-bug #379, packet corruption in Avahi's mDNS reflection feature. Copyparty has a workaround and is OK, but other devices need either --zm4 or --zm6"
|
||||
t = "Invalid pointer in DNSLabel [offset=%d,pointer=%d,length=%d];\n\033[35m NOTE: this is probably avahi-bug #379, packet corruption in Avahi's mDNS-reflection feature. Copyparty has a workaround and is OK, but other devices need either --zm4 or --zm6"
|
||||
raise BufferError(t % args)
|
||||
|
||||
|
||||
|
@ -117,6 +115,8 @@ class DNSBuffer(Buffer):
|
|||
self.offset = pointer
|
||||
elif avahi_379:
|
||||
log_avahi_379((self.offset, pointer, len(self.data)))
|
||||
label.extend(b"a")
|
||||
break
|
||||
else:
|
||||
raise BufferError(
|
||||
"Invalid pointer in DNSLabel [offset=%d,pointer=%d,length=%d]"
|
||||
|
|
Loading…
Reference in a new issue