projects
/
rrq
/
rrqnet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a623829
)
fixup startup error message
author
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Thu, 29 Sep 2022 05:51:57 +0000
(15:51 +1000)
committer
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Thu, 29 Sep 2022 05:51:57 +0000
(15:51 +1000)
rrqnet.c
patch
|
blob
|
history
diff --git
a/rrqnet.c
b/rrqnet.c
index fa8d3f660963624871d97736458ecb5a1e3140e4..efd7066b457cb2438d96f1246cc553ad152cc3ed 100644
(file)
--- a/
rrqnet.c
+++ b/
rrqnet.c
@@
-574,6
+574,7
@@
static int parse_bits(char *bits,int max,struct Allowed *into) {
// Formats: <ipv4-address>[/<bits>][:<port>][=keyfile]
// Formats: <ipv6-address>[/<bits>][=keyfile]
// Formats: \[<ipv6-address>[/<bits>]\][:<port>][=keyfile]
// Formats: <ipv4-address>[/<bits>][:<port>][=keyfile]
// Formats: <ipv6-address>[/<bits>][=keyfile]
// Formats: \[<ipv6-address>[/<bits>]\][:<port>][=keyfile]
+// Formats: hostname:port[=keyfile]
static int parse_allowed(char *arg,struct Allowed *into) {
static char buffer[10000];
int n = strlen( arg );
static int parse_allowed(char *arg,struct Allowed *into) {
static char buffer[10000];
int n = strlen( arg );
@@
-1309,10
+1310,10
@@
static void heartbeat(int fd) {
// Tell how to use this program and exit with failure.
static void usage(void) {
fprintf( stderr, "Packet tunneling over UDP, multiple channels, " );
// Tell how to use this program and exit with failure.
static void usage(void) {
fprintf( stderr, "Packet tunneling over UDP, multiple channels, " );
- fprintf( stderr, "version
0.2.5
\n" );
+ fprintf( stderr, "version
1.5.3
\n" );
fprintf( stderr, "Usage: " );
fprintf( stderr,
fprintf( stderr, "Usage: " );
fprintf( stderr,
- "%s [-v] [-4] [-B n] [-T n] [-m mcast] [-t tap] port [remote]+ \n",
+ "%s [-v] [-
tpg] [-
4] [-B n] [-T n] [-m mcast] [-t tap] port [remote]+ \n",
progname );
exit( 1 );
}
progname );
exit( 1 );
}
@@
-1473,7
+1474,7
@@
int main(int argc, char *argv[]) {
}
// then: required port
if ( sscanf( argv[i++], "%d", &port ) != 1 ) {
}
// then: required port
if ( sscanf( argv[i++], "%d", &port ) != 1 ) {
- fprintf( stderr, "Bad local port
"
);
+ fprintf( stderr, "Bad local port
: %s\n", argv[i-1]
);
usage();
}
// then: any number of allowed remotes
usage();
}
// then: any number of allowed remotes