[hamradio-commits] [uronode] 02/08: New upstream version 2.8
Dave Hibberd
hibby-guest at moszumanska.debian.org
Sat Jan 20 12:26:33 UTC 2018
This is an automated email from the git hooks/post-receive script.
hibby-guest pushed a commit to branch master
in repository uronode.
commit e5129d408c9563d40ca03da3818a5fed305d4c41
Author: hibby <d at vehibberd.com>
Date: Fri Nov 24 18:00:45 2017 +0000
New upstream version 2.8
---
CHANGES.3 | 35 +++++++++++++++++++++++++++++++++++
command.c | 19 +++++++++++++++----
extcmd.c | 2 +-
flexd.c | 2 +-
gateway.c | 18 +++++++++++++++---
node.c | 8 +++++---
node.h | 4 ++--
router.c | 6 +++---
util.c | 7 ++++---
9 files changed, 81 insertions(+), 20 deletions(-)
diff --git a/CHANGES.3 b/CHANGES.3
index e380bbf..ef54a78 100644
--- a/CHANGES.3
+++ b/CHANGES.3
@@ -298,6 +298,41 @@ Thanks to Han for reporting this.
While working on new node W1WCG, I noticed some code clean up in node.c
There's still a lot more to do especially with ANSI.
+15/06/2017 - v2.8
+In gateway.c I cleaned up the do_ping routing slightly. I was going to add
+a default timer but instead decided to let the user hit enter for their own
+"timer" of sorts. Users are also now instructed on the node to hit enter
+in order to abort a ping.
+
+Cleaned up do_nodes so now if there's a slime trail node, rather than prefix
+it with a colon ":", now it will display ##TEMP: instead. This was sorta
+bugging me on just how to handle these. While I was at it, I made a
+modification to gateway.c so if a user tried to "C ##TEMP" it instructs the
+end user to use the callsign-ssid. I can't think of any other node that does
+this.
+
+Thanks to Dave Hibbard (at Debian) for pointing out a dropped "t" in the word
+"software" in flexd.c when the -v switch is used.
+
+Cleaned up some prompt routines including the ipv4/ipv6 login sequences.
+Before (especially with ipv6) if a callsign had no permissions to login via
+the internet they were never informed how to gain access - they were simply
+denied. I found this to somewhat make the node a bit unfriendly. Fixed.
+
+With all the chatter on the 44-net list about IPv6, I've decided to get my
+block active for further testing. In doing so, I noticed that if a user
+telnetted in via IPv6 and made a NetRom connect out, the node failed to
+inform them that they were connected... fixed.
+
+As of this writing there's no outboud telnet or dns functions for IPv6
+but that's not to say it's not in the works. Personally, I don't see a
+true need for IPv6 outbound for amateur radio as the amprnet is going
+quite strong however that's not to say things may not change either. If
+anything, IPv6 through an HE.net tunnel works as slick as the amprnet
+does with the exception of how it handles dynamic clients. Other than
+that, it does appear to tunnel through your ISP filters as amprnet
+does which is a plus.
+
----------- 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 572e338..9f49354 100644
--- a/command.c
+++ b/command.c
@@ -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, "\nSystemD - %s@%s: ",User.call, HostName);
+ axio_printf(NodeIo, "\n%s@%s-IPv6: ",User.call, HostName);
}
if ((User.ul_type ==AF_INET6) && (check_perms(PERM_ANSI, 0L) != -1)) {
- axio_printf(NodeIo, "\n\e[01;31mSystemD \e[0m- \e[01;34m%s@\e[0m%s: ",User.call, HostName);
+ 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_flush(NodeIo); */
}
@@ -118,7 +118,16 @@ void node_logout(char *reason)
if (check_perms(PERM_ANSI, 0L) != -1) {
axio_printf(NodeIo, "\e[0;m");
}
- }
+ }
+ if (User.ul_type == AF_INET6) {
+ if (check_perms(PERM_ANSI, 0L) != -1) {
+ axio_printf(NodeIo, "\e[03;36m");
+ }
+ axio_printf(NodeIo, "Thank you %s, for connecting to the \n%s URONode IPv6 packet shell.\n", User.call, HostName);
+ if (check_perms(PERM_ANSI, 0L) != -1) {
+ axio_printf(NodeIo, "\e[0;m");
+ }
+ }
if (User.ul_type == AF_NETROM) {
axio_printf(NodeIo,"");
}
@@ -662,6 +671,8 @@ int do_nodes(int argc, char **argv)
}
if ((User.ul_type == AF_NETROM) && (i % 4) != 0) {
node_msg("");
+ } else
+ if ((User.ul_type != AF_NETROM) && (i % 4) == 0) {
}
free_proc_nr_nodes(list);
return 0;
@@ -981,7 +992,7 @@ int nuser_list(int argc, char **argv)
break;
case AF_INET6:
- sprintf(buf, "\nTelnet6 (%.9s @ SystemD)", u.call);
+ sprintf(buf, "\nTelnet6 (%.9s @ IPv6)", u.call);
break;
case AF_UNSPEC:
diff --git a/extcmd.c b/extcmd.c
index e108cac..7af5154 100644
--- a/extcmd.c
+++ b/extcmd.c
@@ -144,7 +144,7 @@ static int pipe_extcmd(struct cmd *cmdp, char **argv)
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...");
} else if (User.ul_type == AF_AX25) {
if (check_perms(PERM_ANSI, 0L) != -1) {
axio_printf(NodeIo,"\e[01;31m");
diff --git a/flexd.c b/flexd.c
index 8f8741e..81471a2 100644
--- a/flexd.c
+++ b/flexd.c
@@ -413,7 +413,7 @@ int main(int argc, char *argv[])
printf("FlexD version %s.\n\r", VERSION);
printf("Copywrite (c) 2000-2003 by Roy PE1RJA and Stefano IZ5AWZ\n\r");
printf("Copywrite (c) 2003 - present by Brian Rogers - N1URO.\n\r");
- printf("FlexD is free sofware and you are welcome to redistribute it\n\r");
+ printf("FlexD is free software and you are welcome to redistribute it\n\r");
printf("under the terms of GNU General Public Licence as published\n\r");
printf("by Free Software Foundation; either version 2 of the License, or\n\r");
printf("(at your option) any later version.\n\r");
diff --git a/gateway.c b/gateway.c
index 06c3383..08b0d6f 100644
--- a/gateway.c
+++ b/gateway.c
@@ -271,6 +271,7 @@ static ax25io *connect_to(char **addr, int family, int escape, int compr)
/* else node_msg("Trying %s on %s... Type <RETURN> to abort", User.dl_name, User.dl_port); */
break;
#endif
+ case AF_INET6:
case AF_INET:
if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
node_perror("connect_to: socket", errno);
@@ -493,7 +494,7 @@ static ax25io *connect_to(char **addr, int family, int escape, int compr)
if (check_perms(PERM_ANSI, 0L) != -1) {
axio_printf(NodeIo,"\e[01;32m");
}
- if (User.ul_type == AF_INET) {
+ if ((User.ul_type == AF_INET) || (User.ul_type == AF_INET6)) {
axio_printf(NodeIo,"Virtual circuit established to %s\n", User.dl_name);
}
if (User.ul_type == AF_NETROM) {
@@ -701,7 +702,12 @@ int do_connect(int argc, char **argv)
if (User.ul_type == AF_NETROM) {
axio_printf(NodeIo,"%s} ", NodeId);
}
- axio_printf(NodeIo,"%s not found, please retry your entry.", argv[1]);
+
+ if (strcmp(argv[1], "##TEMP") == 0) {
+ axio_printf(NodeIo,"%s is not connectable. Use the callsign-ssid.", argv[1]);
+ } else {
+ axio_printf(NodeIo,"%s not found. Please retry your entry.", argv[1]);
+ }
family = AF_UNSPEC;
// free_flex_dst(flx);
// free_ax_routes(ax);
@@ -789,7 +795,7 @@ int do_connect(int argc, char **argv)
if (check_perms(PERM_ANSI, 0L) != -1) {
axio_printf(NodeIo,"\e[01;31m");
}
- axio_printf(NodeIo,"\nReturning you to the shell... ");
+ axio_printf(NodeIo,"Returning you to the shell...");
} else
if ((User.ul_type == AF_AX25) && (!stay)) {
axio_flush(NodeIo);
@@ -1034,6 +1040,12 @@ int do_ping(int argc, char **argv)
return 0;
}
if (check_perms(PERM_ANSI, 0L) != -1) {
+ axio_printf(NodeIo,"\e[01;32mPing engaged, hit <ENTER> to abort.\n\e[0m");
+ }
+ if (check_perms(PERM_ANSI, 0L) == -1) {
+ axio_printf(NodeIo, "Ping engaged, hit <ENTER> to abort.\n");
+ }
+ if (check_perms(PERM_ANSI, 0L) != -1) {
axio_printf(NodeIo,"\e[01;35mICMP Echo request sent to: \e[0m");
}
if (check_perms(PERM_ANSI, 0L) == -1) {
diff --git a/node.c b/node.c
index 7ac8d50..8bf2bd8 100644
--- a/node.c
+++ b/node.c
@@ -9,7 +9,8 @@
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-
+//IPv6
+#include <netdb.h>
#include <netax25/ax25.h>
#include <netrose/rose.h>
#include <netax25/axlib.h>
@@ -194,8 +195,8 @@ int main(int argc, char *argv[])
/* axio_flush(NodeIo); */
if(NodeIo!=NULL)
axio_flush(NodeIo);
- if (system("telnet 127.0.0.1 3694") < 0 ) { /* VE3TOK - 18Nov2014, return value */
- syslog(LOG_DEBUG, "Can't \"execute telnet 127.0.0.1 3694\"");
+ if (system("telnet localhost 3694") < 0 ) { /* VE3TOK - 18Nov2014, return value */
+ syslog(LOG_DEBUG, "Can't \"execute telnet ::1 or 127.0.0.1 3694\"");
return 1;
}
node_log(LOGLVL_ERROR,"Closing console telnet session.", -1);
@@ -256,6 +257,7 @@ int main(int argc, char *argv[])
}
if ((pw = read_perms(&User, saddr.sin.sin_addr.s_addr)) == NULL) {
node_msg("Sorry, I'm not allowed to talk to you.");
+ axio_printf(NodeIo,"*** Password required! If you don't have a password please email\n%s for a password you wish to use.\n", Email);
node_log(LOGLVL_LOGIN, "Login denied for %s @ %s", User.call, User.ul_name);
node_logout("Login denied");
}
diff --git a/node.h b/node.h
index 57850a4..0a1e645 100644
--- a/node.h
+++ b/node.h
@@ -1,5 +1,5 @@
-#define VERSION "URONode v2.7"
-#define COMPILING "June 1, 2017"
+#define VERSION "URONode v2.8"
+#define COMPILING "November 23, 2017"
#define STATE_IDLE 0
#define STATE_TRYING 1
diff --git a/router.c b/router.c
index 2132148..ccc522c 100644
--- a/router.c
+++ b/router.c
@@ -206,9 +206,9 @@ int do_dest(int argc, char **argv)
}
if ((i % 4) != 0) axio_printf(NodeIo,"");
free_flex_dst(fdst);
- if (User.ul_type == AF_NETROM) {
- node_msg("");
- }
+// if (User.ul_type == AF_NETROM) {
+// node_msg("");
+// }
return 0;
}
if ((flgt=read_flex_gt()) == NULL) {
diff --git a/util.c b/util.c
index a03e59a..805b9fa 100644
--- a/util.c
+++ b/util.c
@@ -79,9 +79,10 @@ char *print_node(const char *alias, const char *call)
static char node[17];
sprintf(node, "%s%s%s",
- !strcmp(alias, "*") ? "" : alias,
- !strcmp(call, "*") ? "" : ":", call);
-
+ !strcmp(alias, "*") ? "##TEMP:" : alias,
+ !strcmp(alias, "*") ? "" : ":",
+// !strcmp(call, "*") ? "" : call);
+ call);
return node;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/uronode.git
More information about the pkg-hamradio-commits
mailing list