- syslog.syslog(syslog.LOG_DEBUG,
- 'discarded packet %s -> %s (%s)' % (saddr, daddr, why))
-
-#---------- ipif (slip subprocess) ----------
-
-class IpifProcessProtocol(twisted.internet.protocol.ProcessProtocol):
- def __init__(self):
- self._buffer = b''
- def connectionMade(self): pass
- def outReceived(self, data):
- buffer += data
- packets = slip_decode(buffer)
- buffer = packets.pop()
- for packet in packets:
- (saddr, daddr) = packet_addrs(packet)
- route(packet, daddr)
- def processEnded(self, status):
- status.raiseException()
-
-def start_ipif():
- global ipif
- ipif = IpifProcessProtocol()
- reactor.spawnProcess(ipif,
- '/bin/sh',['sh','-c', ipif_command],
- childFDs={0:'w', 1:'r', 2:2})
-
-def queue_inbound(packet):
- ipif.transport.write(slip_delimiter)
- ipif.transport.write(slip_encode(packet))
- ipif.transport.write(slip_delimiter)
+ print('DROP ', saddr, daddr, why)
+# syslog.syslog(syslog.LOG_DEBUG,
+# 'discarded packet %s -> %s (%s)' % (saddr, daddr, why))