Esempio n. 1
0
 def sendCoA(self,pkt):
     log.msg("send radius Coa Request: %s"%(pkt),level=logging.INFO)
     try:
         print self.vendor_id
         if self.vendor_id == ikuai.VENDOR_ID:
             pkg = ikuai.create_dm_pkg(self.secret,pkt["User-Name"][0])
             log.msg("send ikuai radius Coa Request: %s"%(repr(pkg)),level=logging.INFO)
             self.transport.write(pkg,(self.addr, self.port))
         else:
             self.transport.write(pkt.RequestPacket(),(self.addr, self.port))
     except packet.PacketError as err:
         log.err(err,'::send radius Coa Request error %s: %s'%((host, port),str(err)))
Esempio n. 2
0
 def sendCoA(self,pkt):
     self.syslog.debug("send radius Coa Request [username:%s]: %s" % (pkt['User-Name'], repr(pkt)))
     try:
         print self.vendor_id
         if self.vendor_id == ikuai.VENDOR_ID:
             pkg = ikuai.create_dm_pkg(self.secret,pkt["User-Name"][0])
             self.syslog.debug("send ikuai radius Coa Request [username:%s]: %s" % (pkt['User-Name'], repr(pkg)))
             self.transport.write(pkg,(self.addr, self.port))
         else:
             self.transport.write(pkt.RequestPacket(),(self.addr, self.port))
     except packet.PacketError as err:
         self.syslog.error('send radius Coa Request [username:%s] error %s: %s' % (pkt['User-Name'], (host,self.port),str(err)))
Esempio n. 3
0
 def sendCoA(self, pkt):
     log.msg("send radius Coa Request: %s" % (pkt), level=logging.INFO)
     try:
         print self.vendor_id
         if self.vendor_id == ikuai.VENDOR_ID:
             pkg = ikuai.create_dm_pkg(self.secret, pkt["User-Name"][0])
             log.msg("send ikuai radius Coa Request: %s" % (repr(pkg)),
                     level=logging.INFO)
             self.transport.write(pkg, (self.addr, self.port))
         else:
             self.transport.write(pkt.RequestPacket(),
                                  (self.addr, self.port))
     except packet.PacketError as err:
         log.err(
             err, '::send radius Coa Request error %s: %s' %
             ((host, port), str(err)))
Esempio n. 4
0
 def sendCoA(self, pkt):
     self.syslog.debug("send radius Coa Request [username:%s]: %s" %
                       (pkt['User-Name'], repr(pkt)))
     try:
         print self.vendor_id
         if self.vendor_id == ikuai.VENDOR_ID:
             pkg = ikuai.create_dm_pkg(self.secret, pkt["User-Name"][0])
             self.syslog.debug(
                 "send ikuai radius Coa Request [username:%s]: %s" %
                 (pkt['User-Name'], repr(pkg)))
             self.transport.write(pkg, (self.addr, self.port))
         else:
             self.transport.write(pkt.RequestPacket(),
                                  (self.addr, self.port))
     except packet.PacketError as err:
         self.syslog.error(
             'send radius Coa Request [username:%s] error %s: %s' %
             (pkt['User-Name'], (host, self.port), str(err)))