Added the --source-ip argument to build SPA packets with 0.0.0.0 (the fwknopd server can wrap access controls around this)
git-svn-id: file:///home/mbr/svn/fwknop/trunk@119 510a4753-2344-4c79-9c09-4d669213fbeb
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
2009-07-26 Michael Rash <mbr@cipherdyne.org>
|
||||
* Implemented -s command line argument on the fwknop client command line
|
||||
so that the IP "0.0.0.0" can be sent within an SPA packet. The fwknopd
|
||||
server can wrap access requirements around this IP.
|
||||
* Initial public release of fwknop-c-0.62.
|
||||
|
||||
2009-07-23 Michael Rash <mbr@cipherdyne.org>
|
||||
|
||||
+8
-1
@@ -250,7 +250,7 @@ config_init(fko_cli_options_t *options, int argc, char **argv)
|
||||
options->fw_timeout = -1;
|
||||
|
||||
while ((cmd_arg = getopt_long(argc, argv,
|
||||
"a:A:bB:C:D:f:gG:hIm:nN:p:P:qQ:rS:TU:vV", cmd_opts, &index)) != -1) {
|
||||
"a:A:bB:C:D:f:gG:hIm:nN:p:P:qQ:rsS:TU:vV", cmd_opts, &index)) != -1) {
|
||||
|
||||
switch(cmd_arg) {
|
||||
case 'a':
|
||||
@@ -343,6 +343,9 @@ config_init(fko_cli_options_t *options, int argc, char **argv)
|
||||
case SHOW_LAST_ARGS:
|
||||
options->show_last_command = 1;
|
||||
break;
|
||||
case 's':
|
||||
strlcpy(options->allow_ip_str, "0.0.0.0", MAX_IP_STR_LEN);
|
||||
break;
|
||||
case 'S':
|
||||
options->spa_src_port = atoi(optarg);
|
||||
if (options->spa_src_port < 0 || options->spa_src_port > 65535) {
|
||||
@@ -445,6 +448,10 @@ usage(void)
|
||||
" and 'icmp' modes use raw sockets and thus\n"
|
||||
" require root access to run.\n"
|
||||
" -S, --source-port - Set the source port for outgoing SPA packet.\n"
|
||||
" -s, --source-ip - Tell the fwknopd server to accept whatever\n"
|
||||
" source IP the SPA packet has as the IP that\n"
|
||||
" needs access (not recommended, and the\n"
|
||||
" fwknopd server can ignore such requests).\n"
|
||||
" -Q, --spoof-source - Set the source IP for outgoing SPA packet.\n"
|
||||
" -U, --spoof-user - Set the username within outgoing SPA packet.\n"
|
||||
" -q, --quiet - Perform fwknop functions quietly.\n"
|
||||
|
||||
@@ -80,6 +80,7 @@ static struct option cmd_opts[] =
|
||||
{"rand-port", 0, NULL, 'r'},
|
||||
{"spoof-src", 1, NULL, 'Q'},
|
||||
{"show-last", 0, NULL, SHOW_LAST_ARGS},
|
||||
{"source-ip", 0, NULL, 's'},
|
||||
{"source-port", 1, NULL, 'S'},
|
||||
{"test", 0, NULL, 'T'},
|
||||
{"time-offset-plus", 1, NULL, TIME_OFFSET_PLUS},
|
||||
|
||||
Reference in New Issue
Block a user