chiark / gitweb /
wip
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Mar 2017 22:27:54 +0000 (22:27 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Mar 2017 22:27:54 +0000 (22:27 +0000)
server

diff --git a/server b/server
index df49699..aa06eb6 100755 (executable)
--- a/server
+++ b/server
@@ -71,9 +71,7 @@ def route(packet, saddr, daddr):
   except KeyError: dclient = None
   if dclient is not None:
     dclient.queue_outbound(packet)
-  elif daddr.is_multicast:
-    log_discard(packet, saddr, daddr, 'multicast')
-  elif daddr.is_link_local:
+  elif saddr.is_link_local or daddr.is_link_local:
     log_discard(packet, saddr, daddr, 'link-local')
   elif daddr == host or daddr not in network:
     print('TRACE INBOUND ', saddr, daddr, packet)
@@ -84,7 +82,7 @@ def route(packet, saddr, daddr):
     log_discard(packet, saddr, daddr, 'no client')
 
 def log_discard(packet, saddr, daddr, why):
-  print('DROP ', saddr, daddr, why, packet)
+  print('DROP ', saddr, daddr, why)
 #  syslog.syslog(syslog.LOG_DEBUG,
 #                'discarded packet %s -> %s (%s)' % (saddr, daddr, why))