mirror of
				https://github.com/9001/copyparty.git
				synced 2025-11-03 21:43:12 +00:00 
			
		
		
		
	mdns: option to ignore invalid packets on the lan
This commit is contained in:
		@@ -1124,6 +1124,7 @@ def add_zc_mdns(ap):
 | 
			
		||||
    ap2.add_argument("--zm6", action="store_true", help="IPv6 only")
 | 
			
		||||
    ap2.add_argument("--zmv", action="store_true", help="verbose mdns")
 | 
			
		||||
    ap2.add_argument("--zmvv", action="store_true", help="verboser mdns")
 | 
			
		||||
    ap2.add_argument("--zm-no-pe", action="store_true", help="mute parser errors (invalid incoming MDNS packets)")
 | 
			
		||||
    ap2.add_argument("--zms", metavar="dhf", type=u, default="", help="list of services to announce -- d=webdav h=http f=ftp s=smb -- lowercase=plaintext uppercase=TLS -- default: all enabled services except http/https (\033[32mDdfs\033[0m if \033[33m--ftp\033[0m and \033[33m--smb\033[0m is set, \033[32mDd\033[0m otherwise)")
 | 
			
		||||
    ap2.add_argument("--zm-ld", metavar="PATH", type=u, default="", help="link a specific folder for webdav shares")
 | 
			
		||||
    ap2.add_argument("--zm-lh", metavar="PATH", type=u, default="", help="link a specific folder for http shares")
 | 
			
		||||
 
 | 
			
		||||
@@ -336,6 +336,9 @@ class MDNS(MCast):
 | 
			
		||||
                        self.log("stopped", 2)
 | 
			
		||||
                        return
 | 
			
		||||
 | 
			
		||||
                    if self.args.zm_no_pe:
 | 
			
		||||
                        continue
 | 
			
		||||
 | 
			
		||||
                    t = "{} {} \033[33m|{}| {}\n{}".format(
 | 
			
		||||
                        self.srv[sck].name, addr, len(buf), repr(buf)[2:-1], min_ex()
 | 
			
		||||
                    )
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user