]>
git.proxmox.com Git - mirror_kronosnet.git/log
Federico Simoncelli [Fri, 12 Nov 2010 10:42:09 +0000 (11:42 +0100)]
Merge branch 'master' of github.com:fabbione/kronosnet
Federico Simoncelli [Fri, 12 Nov 2010 10:41:52 +0000 (11:41 +0100)]
knet: add timestamp into ping packet
Fabio M. Di Nitto [Fri, 12 Nov 2010 08:41:51 +0000 (09:41 +0100)]
cfg: move ether config in its own struct
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Fri, 12 Nov 2010 08:32:49 +0000 (09:32 +0100)]
cfg: drop unrequired locking
all config changes are already locked by the vty
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Fri, 12 Nov 2010 08:22:42 +0000 (09:22 +0100)]
vty_cli_cmds: fix create interface invokation
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Fri, 12 Nov 2010 08:10:47 +0000 (09:10 +0100)]
vty: add mtu config support in interface menu
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Fri, 12 Nov 2010 06:08:26 +0000 (07:08 +0100)]
vty_cli_cmds: add a few comments
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Fri, 12 Nov 2010 06:07:03 +0000 (07:07 +0100)]
vty_cli_cmds: more sorting
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Fri, 12 Nov 2010 06:05:17 +0000 (07:05 +0100)]
cfg: add concept of default mtu and configurable mtu
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Fri, 12 Nov 2010 05:36:25 +0000 (06:36 +0100)]
vty_cli_cmds: sort code around
move all helper functions at the top and all menu/exec cmd at the bottom
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 11 Nov 2010 14:16:24 +0000 (15:16 +0100)]
vty_cli_cmds: set mac address at iface creation time
also fix an off-by-one check
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Federico Simoncelli [Thu, 11 Nov 2010 13:54:58 +0000 (14:54 +0100)]
Merge branch 'master' of github.com:fabbione/kronosnet
Federico Simoncelli [Thu, 11 Nov 2010 13:54:16 +0000 (14:54 +0100)]
knet: split control thread and heartbeat thread
Fabio M. Di Nitto [Thu, 11 Nov 2010 13:29:09 +0000 (14:29 +0100)]
vty/cfg: allow multiple parameters per command
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 10 Nov 2010 18:45:45 +0000 (19:45 +0100)]
cfg: fix interface name detection
this one needs to be precise
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 10 Nov 2010 15:57:14 +0000 (16:57 +0100)]
vty: start adding bindings to core
this first snap allows to create/remove knet interfaces
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Federico Simoncelli [Wed, 10 Nov 2010 14:28:03 +0000 (15:28 +0100)]
knet: move debug into ping_test
Federico Simoncelli [Wed, 10 Nov 2010 14:00:50 +0000 (15:00 +0100)]
knet: add ping_interval and pong_timeout configuration per link
Federico Simoncelli [Wed, 10 Nov 2010 13:32:56 +0000 (14:32 +0100)]
knet: add trivial heartbeat feature
Federico Simoncelli [Wed, 10 Nov 2010 13:31:45 +0000 (14:31 +0100)]
cosmetic: fix typo
Fabio M. Di Nitto [Wed, 10 Nov 2010 11:42:05 +0000 (12:42 +0100)]
whops.. remove debugging/testing code
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 10 Nov 2010 11:29:03 +0000 (12:29 +0100)]
vty_cli: fix tab completion
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 10 Nov 2010 10:46:41 +0000 (11:46 +0100)]
vty_cli: add parameter concept and tab completion
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Tue, 9 Nov 2010 14:45:45 +0000 (15:45 +0100)]
vty: add basic support for partial command execution and help
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Tue, 9 Nov 2010 09:27:08 +0000 (10:27 +0100)]
vty_auth: fix off-by-one in group checking
a user with the same name of a group is automatically part of that group
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 4 Nov 2010 17:17:08 +0000 (13:17 -0400)]
vty_cli: add ctrl+z handler
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 4 Nov 2010 17:16:40 +0000 (13:16 -0400)]
vty: clear config lock on exit
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 4 Nov 2010 13:08:54 +0000 (14:08 +0100)]
vty_cli_cmds: simply revert action infrastructure
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 4 Nov 2010 12:16:48 +0000 (13:16 +0100)]
knet: check if created tap device has same name of requested
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 4 Nov 2010 12:01:42 +0000 (13:01 +0100)]
vty_cli_cmds: add "no" infrastructure
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 4 Nov 2010 11:48:03 +0000 (12:48 +0100)]
vty_cli_cmds: add interface configuration node layer
and fix a segfault in the help function
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 4 Nov 2010 11:28:29 +0000 (12:28 +0100)]
vty_cli_cmds: cosmetic output for who command
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 4 Nov 2010 11:25:58 +0000 (12:25 +0100)]
vty: add configuration handler
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 3 Nov 2010 22:00:48 +0000 (23:00 +0100)]
vty_cli: allow to logout via ctrl+d and rename node names to be more useful
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 3 Nov 2010 21:54:41 +0000 (22:54 +0100)]
vty_cli_cmds: add logout/exit commands
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Tue, 2 Nov 2010 11:42:08 +0000 (12:42 +0100)]
vty_cli_cmds: group code together and make command search non-destructive
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Tue, 2 Nov 2010 11:27:26 +0000 (12:27 +0100)]
vty_cli: end of history next should give a clean line
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Mon, 1 Nov 2010 10:44:20 +0000 (11:44 +0100)]
vty_cli_cmds: add help command
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Mon, 1 Nov 2010 10:38:23 +0000 (11:38 +0100)]
vty_cli_cmds: add default help handler
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Mon, 1 Nov 2010 10:26:13 +0000 (11:26 +0100)]
vty: handle static allocation consistently
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Mon, 1 Nov 2010 10:21:40 +0000 (11:21 +0100)]
vty: laydown basic code to execute commands
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Sun, 31 Oct 2010 13:55:38 +0000 (14:55 +0100)]
vty_utils: fix segfault when free'ing history
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Fri, 29 Oct 2010 06:58:02 +0000 (08:58 +0200)]
vty: inform CLI users that the server is going away
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 28 Oct 2010 22:26:35 +0000 (00:26 +0200)]
vty: add note on exit path
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 28 Oct 2010 22:12:53 +0000 (00:12 +0200)]
vty: fix pam memory leakage in case of failure/timeout
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 28 Oct 2010 22:01:27 +0000 (00:01 +0200)]
vty: don't leak memory on pthread_cancel
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 28 Oct 2010 17:48:46 +0000 (19:48 +0200)]
cosmetic: add extra return to login info
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 28 Oct 2010 17:43:38 +0000 (19:43 +0200)]
vty_cli: add basic concept of prompt
fix line redraw when parsing history
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 28 Oct 2010 17:24:18 +0000 (19:24 +0200)]
vty_cli: fix telnet backchar on x86
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 28 Oct 2010 10:53:05 +0000 (12:53 +0200)]
vty_cli: add history handler
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Federico Simoncelli [Thu, 28 Oct 2010 09:08:27 +0000 (11:08 +0200)]
vty: cosmetics changes
Fabio M. Di Nitto [Thu, 28 Oct 2010 09:02:13 +0000 (11:02 +0200)]
vty_cli: add support for insert mode
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 28 Oct 2010 08:51:08 +0000 (10:51 +0200)]
vty_cli: bind extra keys
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 28 Oct 2010 08:45:53 +0000 (10:45 +0200)]
vty_cli: add more home/end escape codes
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Federico Simoncelli [Thu, 28 Oct 2010 08:29:47 +0000 (10:29 +0200)]
vty: add extra escape sequences (home, ins, del, end, pg-up/down)
Fabio M. Di Nitto [Thu, 28 Oct 2010 08:16:48 +0000 (10:16 +0200)]
vty_cli: add ctrl+t handler
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 28 Oct 2010 08:07:20 +0000 (10:07 +0200)]
vty: fix off by one vty allocation
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 28 Oct 2010 07:40:37 +0000 (09:40 +0200)]
vty_cli: add forward word handler
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 28 Oct 2010 07:33:26 +0000 (09:33 +0200)]
vty_cli: add kill forward word handler
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 28 Oct 2010 07:31:00 +0000 (09:31 +0200)]
vty_cli: add ctrl+w handler
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 28 Oct 2010 07:17:52 +0000 (09:17 +0200)]
vty_cli: fix refresh when adding in the middle of the buffer
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 28 Oct 2010 07:13:53 +0000 (09:13 +0200)]
vty_cli: add backward word handler
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Thu, 28 Oct 2010 07:04:52 +0000 (09:04 +0200)]
vty_cli: make add_to_buf echo to terminal
temporary disable knet_vty_rewrite_line as it's not used right now
this change makes the cli a lot more snappy :)
fix an off-by-one buffer init
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 27 Oct 2010 19:29:54 +0000 (21:29 +0200)]
vty_cli: add ctrl+u handler
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 27 Oct 2010 19:23:16 +0000 (21:23 +0200)]
vty_cli: add ctrl+h / del handlers
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 27 Oct 2010 18:36:38 +0000 (20:36 +0200)]
vty_cli: add ctrl+e handler
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 27 Oct 2010 18:33:40 +0000 (20:33 +0200)]
vty_cli: add ctrl+k handler
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 27 Oct 2010 18:18:55 +0000 (20:18 +0200)]
vty_cli: add ctrl+c handler
temporary change enter handler to differentiate in testing
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 27 Oct 2010 18:09:58 +0000 (20:09 +0200)]
vty_cli: add ctrl+a handler
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 27 Oct 2010 17:55:42 +0000 (19:55 +0200)]
vty_cli: add backward/forward char handlers
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 27 Oct 2010 17:26:46 +0000 (19:26 +0200)]
vty_cli: remove debugging
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 27 Oct 2010 17:18:29 +0000 (19:18 +0200)]
vty_cli: fix parsing of escape chars
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Federico Simoncelli [Wed, 27 Oct 2010 13:13:25 +0000 (15:13 +0200)]
Merge branch 'master' of github.com:fabbione/kronosnet
Federico Simoncelli [Wed, 27 Oct 2010 13:13:16 +0000 (15:13 +0200)]
netutils: check name resolution in strtoaddr
Fabio M. Di Nitto [Wed, 27 Oct 2010 12:51:22 +0000 (14:51 +0200)]
vty_cli: add support for escape chars
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 27 Oct 2010 12:00:14 +0000 (14:00 +0200)]
vty_cli: lay down scheleton for parsing CLI input
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 27 Oct 2010 10:53:46 +0000 (12:53 +0200)]
vty_cli: drop idle update in favour of the generic one
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 27 Oct 2010 10:51:54 +0000 (12:51 +0200)]
vty: make timeout global for all CLI's
move the checks into the main vty thread that's idle most of the time
anyway.
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 27 Oct 2010 09:25:49 +0000 (11:25 +0200)]
vty cli: add basic infrastructure for CLI
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 27 Oct 2010 09:24:57 +0000 (11:24 +0200)]
vty_utils: some iacs send a response
MUST make that dynamic... really
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Federico Simoncelli [Wed, 27 Oct 2010 09:09:15 +0000 (11:09 +0200)]
Merge branch 'master' of github.com:fabbione/kronosnet
Federico Simoncelli [Wed, 27 Oct 2010 09:09:03 +0000 (11:09 +0200)]
netutils: add tests for strtoaddr and addrtostr
Fabio M. Di Nitto [Wed, 27 Oct 2010 08:30:00 +0000 (10:30 +0200)]
vty: configure telnet session and add better error reporting
all manual steps at init requires manual checking, the vty loop will do that
in an a more elegant fashion :)
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 27 Oct 2010 07:57:36 +0000 (09:57 +0200)]
vty utils: return error if user requested to write more than VTY_MAX_BUFFER_SIZE
Probably at somepoint we should allocate this buffer dynamically
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 27 Oct 2010 07:33:43 +0000 (09:33 +0200)]
vty_utils: add connection barrier if socket is closed underneath our feet
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 27 Oct 2010 07:15:24 +0000 (09:15 +0200)]
cosmetic: change welcome message
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 27 Oct 2010 06:44:50 +0000 (08:44 +0200)]
vty: remove debugging setting
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Wed, 27 Oct 2010 06:44:21 +0000 (08:44 +0200)]
build: check for pthreads at configure.ac
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Federico Simoncelli [Tue, 26 Oct 2010 15:29:46 +0000 (17:29 +0200)]
knet: add knet_listener structure (replaces knet_handle_bind)
Fabio M. Di Nitto [Mon, 25 Oct 2010 19:22:58 +0000 (21:22 +0200)]
vty: cleanup error/info reporting code
OMG.. did I really write that crap?
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Mon, 25 Oct 2010 19:13:58 +0000 (21:13 +0200)]
Merge branch 'master' of github.com:fabbione/kronosnet
Fabio M. Di Nitto [Mon, 25 Oct 2010 19:13:31 +0000 (21:13 +0200)]
build: scan for more headers
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Federico Simoncelli [Mon, 25 Oct 2010 19:11:28 +0000 (21:11 +0200)]
knet: do not resolve host names
Fabio M. Di Nitto [Mon, 25 Oct 2010 11:31:17 +0000 (13:31 +0200)]
vty: free memory
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Fri, 22 Oct 2010 15:30:09 +0000 (17:30 +0200)]
vty: more fixes on the auth sequence and better error reports
Will I ever get this one right?
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Fri, 22 Oct 2010 14:19:43 +0000 (16:19 +0200)]
vty_auth: make pam_authenticate errors fatal
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Fri, 22 Oct 2010 14:15:59 +0000 (16:15 +0200)]
vty: fix PAM init sequence and error report
deal with the lack of /etc/pam.d/kronosnet without crashing
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Fabio M. Di Nitto [Fri, 22 Oct 2010 14:04:27 +0000 (16:04 +0200)]
vty: log all connections, including source ip and port
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Federico Simoncelli [Fri, 22 Oct 2010 13:22:07 +0000 (15:22 +0200)]
Merge branch 'master' of github.com:fabbione/kronosnet
Federico Simoncelli [Fri, 22 Oct 2010 13:21:50 +0000 (15:21 +0200)]
knet: check malloc return code in addrtostr