1. 26 Mar, 2015 2 commits
  2. 20 Feb, 2015 2 commits
  3. 02 Feb, 2015 1 commit
  4. 21 Oct, 2014 4 commits
  5. 25 Jul, 2014 1 commit
    • Add support for router ACL. · f4a09b17
      Tomas Hlavacek authored
      Add support for ACL that could be associated with a router to restrict
      users that are eligible to run commands on the router.
      
      Just add acl=['username1','username2',...] to the configuration
      into the parameters of the router.
  6. 06 Jun, 2014 3 commits
    • BIRD: Fix timeout in case ip/subnet is not in the routing table · 9268ed2e
      Frederik Kriewitz authored
      Fixes exceptions like this:
      ERROR: Exception occured while running a command:Traceback (most recent
      call last):
        File "/var/www/html/ulg.py", line 498, in commandThreadBody
          session.getRouter().runAsyncCommand(session.getCommand(),session.getParameters(),FakeSessionFile(session))
        File "/var/www/html/ulgmodel.py", line 463, in runAsyncCommand
          return self.runRawCommand(c,outfile)
        File "/var/www/html/ulgbird.py", line 544, in runRawCommand
          l = sf.readline()
        File "/usr/lib/python2.7/socket.py", line 447, in readline
          data = self._sock.recv(self._rbufsize)
      timeout: timed out
      Signed-off-by: 's avatarTomas Hlavacek <tmshlvck@gmail.com>
    • gracefully handle non UTF-8 output of whois · 2df681bf
      Frederik Kriewitz authored
      Fixes exeptions like this (in case whois returns non utf-8 output):
      ERROR in CGI: Traceback (most recent call last):
          File "/var/www/html/ulg.py", line 775, in <module>
          handler.whois(**params)
          File "/var/www/html/ulg.py", line 738, in whois
          print self.runULGWhois(key,objtype)
          File "/var/www/html/ulg.py", line 710, in runULGWhois
          res = whois.lookup(key)
          File "/var/www/html/whois.py", line 43, in lookup
          res=res+l.decode('utf-8')
          File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
          return codecs.utf_8_decode(input, errors, True)
      UnicodeDecodeError: 'utf8' codec can't decode byte 0xf3 in position 24:
      invalid continuation byte
      Signed-off-by: 's avatarTomas Hlavacek <tmshlvck@gmail.com>
    • Fix render() encoding · 1a9d7416
      Frederik Kriewitz authored
      Fixes exceptions like this:
      ERROR in CGI: Traceback (most recent call last):
        File "/var/www/html/ulg.py", line 785, in <module>
          handler.index(**params)
        File "/var/www/html/ulg.py", line 722, in index
          print self.renderULGIndex()
      UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in
      position 6254: ordinal not in range(128)
      Signed-off-by: 's avatarTomas Hlavacek <tmshlvck@gmail.com>
  7. 18 Apr, 2014 1 commit
    • Fix line break in Cisco show bgp ipv4 uni sum · fa12f979
      Tomas Hlavacek authored
      Line break in Cisco parser for show bgp ipv4 unicast summary caused
      exception. This happens when the IP address is longer and newline
      is inserted to allign columns. And this happens especially when
      somebody uses IPv6 peer to transport IPv4 routes.
      
      Fix line breaks using code for IPv6 also in IPv4 handling
      code.
  8. 17 Apr, 2014 3 commits
  9. 22 Jan, 2014 1 commit
    • Fix bug in BirdRouterRemote init · b96cb793
      Tomas Hlavacek authored
      There was a bug in BirdRouterRemote __init__ function in
      self.bin_ssh init procedure. The self.bin_ssh was set to None when
      bin_birdc parameter was passed. Careless copy-paste artefact perhaps.
      Bug has been discovered by Batbileg Sugar batbileg@gemnet.mn .
  10. 10 Jan, 2014 1 commit
  11. 20 Sep, 2013 1 commit
    • Fix BIRD show protocols partitioning · 553cd2ea
      Tomas Hlavacek authored
      Fix BirdShowProtocolsCommand and parseBirdShowProtocols not to duplicate
      partitioning of the result (for the display as a table). Before this patch
      it didn't worked because parseBirdShowProtocols reduced results to i.e.
      [100..200] and later decorateResult in BirdShowProtocols reduced the
      previously reduced result of length 100 to [100..200] which is empty.
  12. 12 Jul, 2013 1 commit
    • Add sorting of BIRD RT and peer tables · db343b70
      Tomas Hlavacek authored
      Sort both control tables that ULG obtains automatically form BIRD daemon
      on start to construct drop-down select boxes on main page at the first place.
      The sorting occures when the tables are read and saved in the internal (persistent) structure.
  13. 02 May, 2013 2 commits
    • Cisco: Fix graph when local prefix is queried · f97aa9d5
      Tomas Hlavacek authored
      Graph did failed to display when locally originated prefix was
      queried. Now it shows linear graph with an originating AS.
    • Cisco: Fix show bgp ipv4/6 uni neigh rec parser · 0eb449fc
      Tomas Hlavacek authored
      Fix a problem with a false assumption previously made on length of
      the first field in output of a command show bgp ipv4/6 unicast neighbor
      <IP> received-routes. On newer IOSes it is 5-chars long (because of RPKI flags)
      but on older ones it is only 4 chars.
      
      Example:
      
      marge>sh bgp ipv4 uni neigh 91.210.16.3 received-r
      BGP table version is 55601421, local router ID is 217.31.48.123
      Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                    r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
                    x best-external, a additional-path, c RIB-compressed,
      Origin codes: i - IGP, e - EGP, ? - incomplete
      RPKI validation codes: V valid, I invalid, N Not found
      
           Network          Next Hop            Metric LocPrf Weight Path
       *   192.88.99.0      91.210.16.3                            0 25192 i
       *   193.17.47.0      91.210.16.3                            0 25192 20701 i
      ^^^^^
      
      Thanks to julianeble@yahoo.com.br for pointing it out.
  14. 04 Apr, 2013 5 commits
    • Convert Juniper to use CommonSelectionParameter · e1c16caa
      Tomas Hlavacek authored
      Convert Juniper router handlers and commands to use CommonSelectionParameter
      instead of SelectionParameter.
    • Fix typos introduced by previous commit · 05de1e14
      Tomas Hlavacek authored
      Fix minor typos introduced by previous commit. The bug slightly affected
      effectivness of the ULG CGI startup.
    • Convert BIRD to use CommonSelectionParameter · 1c299957
      Tomas Hlavacek authored
      Convert BIRD router handlers and commands to use CommonSelectionParameter
      instead of SelectionParameter.
    • Convert Cisco to use CommonSelectionParameter · 7e6d6c97
      Tomas Hlavacek authored
      Convert Cisco routers and commands to use CommonSelectionParameter
      instead of SelectionParameter.
    • Add support for CommonSelectionParameter · f91fd079
      Tomas Hlavacek authored
      There are problems with page size and page loading speed when there
      are more routers with several peers and several BGP related commands
      because selection commands multiplicate the peer tables in the resulting
      javascript placed into the resulting page. This is not effective enough and
      therefore sligh rewrite is needed.
      
      Introduce new type of SelectionParameter - CommonSelectionParameter that
      has its ID and it is placed to a JS variable in the beginning of the page
      or function that uses the values inside only once. Then construction of the
      select boxes uses this variables to feed needed values according to the
      ID of the content.
  15. 27 Mar, 2013 11 commits
  16. 23 Mar, 2013 1 commit