From b29219f467fd4f560171b7a9fcaf5af37634933e Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Thu, 27 Dec 2018 15:51:07 +0000 Subject: [PATCH] New upstream version 2.9 --- CHANGES.3 | 29 ++++++++++++ command.c | 8 ++-- extcmd.c | 20 +++++--- gateway.c | 2 +- jnos20k.diff | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++ node.h | 4 +- router.c | 7 +-- 7 files changed, 181 insertions(+), 19 deletions(-) create mode 100644 jnos20k.diff diff --git a/CHANGES.3 b/CHANGES.3 index b31c8d1..ef5a99f 100644 --- a/CHANGES.3 +++ b/CHANGES.3 @@ -344,6 +344,35 @@ Note: this *only* affected an incoming NetRom connection. Changed this file and node.h to reflect 2.8.1. +27/05/2018 v2.9 +Changed the abort message from "Connection Aborted" to just "Aborted". +The madness in the logic is that FBB and other PBBS scripts may only +read "Connect" and send their next command in their sequence and thus +causing a bit of a loop. + +Changed version number in node.h +Changed this file. + +I noticed that an IPv6 connection did NOT offer EXit as a command. Fixed. + +I also noticed that for an IPv6 connection, when running an external command +it did not inform the user that they were being returned to the node which +may hint that the plug-in is not returning to the node properly, or is +exiting/forking prior to it's close. This is now fixed. + +Mainly for sysop debugging purposes but also for end users, when executing a +plugin such as NS or tracer, it'll still open with "Executing command" but now +it will return back to the node prompt with "Command ended.". This lets both +the sysop and end user know the command exited properly, like with a +"return 0" + +I decided that just having IPv6 as a trailer for IPv6 connects at the prompt +to be a bit vague in display so to keep it a bit more consistant with IPv4 +it now will show ...:/uronode6 instead. + +Fixed the "Sockets:" line in the Status command display. The word "Sessions" +was off by one space throwing all the following column headers off by 1 space. + ----------- Note on SystemD -------- In uronode.socket, you'll notice the line: ListenStream=0.0.0.0:3694 diff --git a/command.c b/command.c index 9f49354..a688aa2 100644 --- a/command.c +++ b/command.c @@ -33,7 +33,7 @@ void init_nodecmds(void) add_internal_cmd(&Nodecmds, "Announce", 1, do_help); add_internal_cmd(&Nodecmds, "Bye", 1, do_bye); add_internal_cmd(&Nodecmds, "Escape", 1, do_escape); - if (User.ul_type == AF_INET) { + if (User.ul_type == AF_INET || (User.ul_type == AF_INET6)) { add_internal_cmd(&Nodecmds, "EXit", 1, do_bye); } add_internal_cmd(&Nodecmds, "Help", 1, do_help); @@ -99,10 +99,10 @@ void node_prompt(const char *fmt, ...) axio_printf(NodeIo,"\r\e[01;35m-=>\e[0m \b"); } if ((User.ul_type ==AF_INET6) && (check_perms(PERM_ANSI, 0L) == -1)) { - axio_printf(NodeIo, "\n%s@%s-IPv6: ",User.call, HostName); + axio_printf(NodeIo, "\r\n%s@%s:/uronode6: ",User.call, HostName); } if ((User.ul_type ==AF_INET6) && (check_perms(PERM_ANSI, 0L) != -1)) { - axio_printf(NodeIo, "\n\e[01;34m%s\e[0m@\e[01;31m%s\e[0m-\e[01;33mIPv6\e[0m: ",User.call, HostName); + axio_printf(NodeIo, "\r\n\e[01;34m%s\e[0m@\e[01;31m%s:/\e[0m\e[01;33muronode6\e[0m: ",User.call, HostName); } /* axio_flush(NodeIo); */ } @@ -884,7 +884,7 @@ int do_status(int argc, char **argv) } free_flex_dst(fd_list); - axio_printf(NodeIo,"Sockets: Sessions Dest/Nodes Links/Routes\n"); + axio_printf(NodeIo,"Sockets: Sessions Dest/Nodes Links/Routes\n"); axio_printf(NodeIo,"------------------ ---------- ---------- ------------\n"); axio_printf(NodeIo,"AX25: %-10d %-10d %-10d\n",na,nd,nl); #ifdef HAVE_NETROM diff --git a/extcmd.c b/extcmd.c index 7af5154..2c9a952 100644 --- a/extcmd.c +++ b/extcmd.c @@ -135,26 +135,31 @@ static int pipe_extcmd(struct cmd *cmdp, char **argv) if (User.ul_type == AF_NETROM) { axio_printf(NodeIo, "%s} ", NodeId); if (check_perms(PERM_ANSI, 0L) != -1) { - axio_printf(NodeIo,"\e[01;31mWelcome back.\e[0m"); +// axio_printf(NodeIo,"\e[01;31mWelcome back.\e[0m"); + axio_printf(NodeIo,"\e[01;31mEnd of command.\e[0m"); } else { - axio_printf(NodeIo, "Welcome back."); +// axio_printf(NodeIo, "Welcome back."); + axio_printf(NodeIo, "End of command."); } - } else if (User.ul_type == AF_INET) { + } else if ((User.ul_type == AF_INET) || (User.ul_type == AF_INET6)) { if (check_perms(PERM_ANSI, 0L) != -1) { axio_printf(NodeIo, "\e[01;31m"); } - axio_printf(NodeIo, "Returning you to the shell..."); +// axio_printf(NodeIo, "Returning you to the shell..."); + axio_printf(NodeIo, "End of command."); } else if (User.ul_type == AF_AX25) { if (check_perms(PERM_ANSI, 0L) != -1) { axio_printf(NodeIo,"\e[01;31m"); } - axio_printf(NodeIo,"Welcome back to %s.", FlexId); +// axio_printf(NodeIo,"Welcome back to %s.", FlexId); + axio_printf(NodeIo,"End of command."); } else if (User.ul_type == AF_ROSE) { if (check_perms(PERM_ANSI, 0L) != -1) { axio_printf(NodeIo,"\e[01;31m"); } - axio_printf(NodeIo,"Back to %s", RoseId); +// axio_printf(NodeIo,"Back to %s", RoseId); + axio_printf(NodeIo,"End of command."); } #endif @@ -186,7 +191,8 @@ int extcmd(struct cmd *cmdp, char **argv) #ifdef HAVEMOTD if (cmdp->flags & ECMD_RECONN) { if (User.ul_type == AF_NETROM) { - axio_printf(NodeIo, "%s} Welcome back.", NodeId); +// axio_printf(NodeIo, "%s} Welcome back.", NodeId); + axio_printf(NodeIo, "%s} End of command.", NodeId); } } else if (User.ul_type == AF_AX25) { diff --git a/gateway.c b/gateway.c index 08b0d6f..e480b8f 100644 --- a/gateway.c +++ b/gateway.c @@ -436,7 +436,7 @@ static ax25io *connect_to(char **addr, int family, int escape, int compr) if (check_perms(PERM_ANSI, 0L) != -1) { axio_printf(NodeIo, "\e[05;31m"); } - axio_printf(NodeIo,"Connection aborted."); + axio_printf(NodeIo,"Aborted."); if (check_perms(PERM_ANSI, 0L) != -1) { axio_printf(NodeIo, "\e[0;m"); } diff --git a/jnos20k.diff b/jnos20k.diff new file mode 100644 index 0000000..5f999c8 --- /dev/null +++ b/jnos20k.diff @@ -0,0 +1,130 @@ +Common subdirectories: jnos/backup and jnos2/backup +Common subdirectories: jnos/installerv2.1 and jnos2/installerv2.1 +Common subdirectories: jnos/j2pwmgr and jnos2/j2pwmgr +Common subdirectories: jnos/k6fsh and jnos2/k6fsh +diff -u jnos/mailbox.c jnos2/mailbox.c +--- jnos/mailbox.c 2016-07-03 10:04:21.000000000 -0400 ++++ jnos2/mailbox.c 2016-09-13 22:45:14.293150509 -0400 +@@ -1646,7 +1646,7 @@ + + /* Now say goodbye */ + if(!(m->privs & IS_EXPERT)) +- tprintf("\nThank you %s, for calling %s JNOS.\n", ++ tprintf("%s, thank you for calling %s. Come back soon.\nRemember to keep packet alive!\n", + #ifdef USERLOG + m->username ? m->username : m->name, + #else +diff -u jnos/makefile jnos2/makefile +--- jnos/makefile 2015-12-08 12:37:21.000000000 -0500 ++++ jnos2/makefile 2016-09-14 18:18:30.268383703 -0400 +@@ -198,7 +198,8 @@ + echo "YOU MUST EDIT scanjmsg.c TO SPECIFY WHERE scanjmsg.dat IS LOCATED" + + clean: +- $(RM) *.[oa] ++# Oops, forgot to remove possible existing binaries too! - N1URO ++ $(RM) *.[oa] jnos jnospwmgr jnosinstaller j2pwmgr/j2pwrtns.o + + clients.a: $(CLIENTS) + $(RM) clients.a +diff -u jnos/mboxcmd.c jnos2/mboxcmd.c +--- jnos/mboxcmd.c 2016-07-03 10:04:26.000000000 -0400 ++++ jnos2/mboxcmd.c 2016-09-13 22:45:14.293150509 -0400 +@@ -478,7 +478,7 @@ + #ifdef NETROM + if(Nr_iface != NULLIF) { /* Use netrom call, and alias (if exists) */ + if(*Myalias != '\0') +- sprintf(Mbnrid,"%s:%s ",pax25(tmp,Myalias), ++ sprintf(Mbnrid,"%s:%s} ",pax25(tmp,Myalias), + pax25(tmp2,Nr_iface->hwaddr)); + else + sprintf(Mbnrid,"%s ",pax25(tmp,Nr_iface->hwaddr)); +@@ -486,7 +486,7 @@ + } + /* Use Mycall, and alias (if exists) */ + if(*Myalias != '\0') +- sprintf(Mbnrid,"%s:%s ",pax25(tmp,Myalias),pax25(tmp2,Mycall)); ++ sprintf(Mbnrid,"%s:%s} ",pax25(tmp,Myalias),pax25(tmp2,Mycall)); + else + #endif + #ifdef AX25 +diff -u jnos/misc.c jnos2/misc.c +--- jnos/misc.c 2007-04-12 14:08:19.000000000 -0400 ++++ jnos2/misc.c 2016-09-13 22:45:14.293150509 -0400 +@@ -14,6 +14,8 @@ + n = strlen(s); + if(!strncmp(s,"convers",n)) + p = IPPORT_CONVERS; ++ else if(!strncmp(s,"node",n)) ++ p = IPPORT_NODE; /* URONode port - N1URO */ + else if(!strncmp(s,"telnet",n)) + p = IPPORT_TELNET; + else if(!strncmp(s,"ttylink",n)) +diff -u jnos/netuser.c jnos2/netuser.c +--- jnos/netuser.c 2007-04-12 14:08:19.000000000 -0400 ++++ jnos2/netuser.c 2016-09-13 22:45:14.293150509 -0400 +@@ -164,9 +164,12 @@ + case 1234: /* Pulled out of the air */ + sprintf(port,"remote"); + break; +- case 3600: ++ case 3600: /* Convers server port */ + sprintf(port,"convers"); + break; ++ case 3694: /* URONode inbound tcp port - N1URO*/ ++ sprintf(port,"node"); ++ break; + default: + sprintf(port,"%u",s->port); + break; +diff -u jnos/nrcmd.c jnos2/nrcmd.c +--- jnos/nrcmd.c 2012-03-20 12:30:29.000000000 -0400 ++++ jnos2/nrcmd.c 2016-09-13 22:45:14.293150509 -0400 +@@ -498,7 +498,7 @@ + * ALSO change the size of the STRSIZE define above !!! + */ + sprintf(&temp[k],"%-16s %s %3d %3d %-8s %-9s %c %-5u",buf, +- rp->flags & G8BPQ_NODEMASK ? "(BPQ)" : " ", ++ rp->flags & G8BPQ_NODEMASK ? " " : " ", + bp->quality,bp->obsocnt, + np->iface->name, + pax25(neighbor,np->call), +@@ -631,7 +631,7 @@ + #endif + ,buf,pax25(destbuf,rp->call) + #ifdef G8BPQ +- ,rp->flags & G8BPQ_NODEMASK ? "(BPQ)" : " " ++ ,rp->flags & G8BPQ_NODEMASK ? " " : " " + #endif + ); + } else +@@ -648,7 +648,7 @@ + #endif + #ifdef G8BPQ + if (npp && (npp->flags & G8BPQ_NODEMASK)) +- tprintf ("(BPQ)"); ++ tprintf (" "); + else + #endif + +@@ -793,7 +793,7 @@ + #endif + #ifdef G8BPQ + if (rp && (rp->flags & G8BPQ_NODEMASK)) +- tprintf ("(BPQ)"); ++ tprintf (" "); + else + #endif + +Common subdirectories: jnos/old_inp_code and jnos2/old_inp_code +diff -u jnos/socket.h jnos2/socket.h +--- jnos/socket.h 2016-06-26 13:27:07.000000000 -0400 ++++ jnos2/socket.h 2016-09-14 10:20:04.532733148 -0400 +@@ -56,6 +56,7 @@ + #define IPPORT_RSYSOP 1513 /* Remote sysop login (totally arbitrary #) */ + #define IPPORT_CONVERS 3600 /* Converse */ + #define IPPORT_XCONVERS 3601 /* LZW Convers */ ++#define IPPORT_NODE 3694 /* URONode telnet port - N1URO*/ + #define IPPORT_CALLDB 1235 /* Pulled out of the air GRACILIS */ + #define IPPORT_TRACE 1236 /* Pulled out of the air - WG7J */ + #define IPPORT_TERM 5000 /* Serial interface server port */ diff --git a/node.h b/node.h index f03f442..c54214a 100644 --- a/node.h +++ b/node.h @@ -1,5 +1,5 @@ -#define VERSION "URONode v2.8.1" -#define COMPILING "December 7, 2017" +#define VERSION "URONode v2.9" +#define COMPILING "May 27, 2018" #define STATE_IDLE 0 #define STATE_TRYING 1 diff --git a/router.c b/router.c index ea36d28..f211780 100644 --- a/router.c +++ b/router.c @@ -205,17 +205,14 @@ int do_dest(int argc, char **argv) axio_printf(NodeIo,"%-7s %-5s %4ld%c",p->dest_call,ssid,p->rtt,(++i % 4) ? ' ' : '\n'); } if ((User.ul_type == AF_NETROM) && (i % 4) == 0) { - node_msg(""); } if ((User.ul_type == AF_NETROM) && (i % 4) != 0) { node_msg(""); } else - if ((User.ul_type != AF_NETROM) && (i % 4) == 0) { + if ((User.ul_type != AF_NETROM) && (i % 4) != 0) { + printf("test"); } free_flex_dst(fdst); -// if (User.ul_type == AF_NETROM) { -// node_msg(""); -// } return 0; } if ((flgt=read_flex_gt()) == NULL) {