chiark / gitweb /
fixes
[hippotat.git] / hippotat / __init__.py
index 35c87f2e1ce2b494c24da44ca8d7911bfb2a5bac..22c92dcf0f4b05d67a8a5e1440d57a0976c732ec 100644 (file)
@@ -37,6 +37,7 @@ class DBG(twisted.python.constants.Names):
   INIT = NamedConstant()
   QUEUE = NamedConstant()
   QUEUE_CTRL = NamedConstant()
+  HTTP_FULL = NamedConstant()
 
 _hex_codec = codecs.getencoder('hex_codec')
 
@@ -111,9 +112,9 @@ class ConfigResults:
 
 c = ConfigResults()
 
-def log_discard(packet, saddr, daddr, why):
+def log_discard(packet, iface, saddr, daddr, why):
   log_debug(DBG.DROP,
-            'discarded packet %s -> %s (%s)' % (saddr, daddr, why),
+            'discarded packet [%s] %s -> %s: %s' % (iface, saddr, daddr, why),
             d=packet)
 
 #---------- packet parsing ----------
@@ -184,7 +185,7 @@ class _IpifProcessProtocol(twisted.internet.protocol.ProcessProtocol):
   def slip_on_packet(self, packet):
     (saddr, daddr) = packet_addrs(packet)
     if saddr.is_link_local or daddr.is_link_local:
-      log_discard(packet, saddr, daddr, 'link-local')
+      log_discard(packet, 'ipif', saddr, daddr, 'link-local')
       return
     self._router(packet, saddr, daddr)
   def processEnded(self, status):