162 Commits

Author SHA1 Message Date
Erik Ekman
589027568b Add option to allow wildcard as start of topdomain 2021-08-24 23:32:57 +02:00
Erik Ekman
cc51ee6f02 Formatting: Indent multi-line prints less 2021-01-31 13:54:09 +01:00
Erik Ekman
4b3d6e2962 Formatting: Use tabs for indents 2021-01-31 13:46:12 +01:00
Erik Ekman
19d0d1be64 Formatting: Space between 'if' and parenthesis 2020-07-24 18:56:30 +02:00
Ralf Ramsauer
52c4940523 Warn, warn warn.
iodine does not seem to follow any styling guidelines (mixture of
different function prototypes, ...).  So let's introduce some.  This
will improve overall code quality and readability.

Additionally, warnings will improve code quality as well. Let's turn on
very pedantic warnings, and fix everything where the compiler barks
back.

Introduce the following function definition scheme:
  type function_name(type name, type1 name1 ...)
  {
  }
This allows us to copy and paste the definition to the declaration by
selecting one single line.

Furthermore, limit line length to 80 characters.

Signed-off-by: Ralf Ramsauer <ralf@ramses-pyramidenbau.de>
2017-03-11 21:30:01 -08:00
Ralf Ramsauer
ac6db12ddb iodine, iodined: print intentional help to stdout
Like other unix tools: don't print application output, if the user asks
intentionally for help.

Signed-off-by: Ralf Ramsauer <ralf@ramses-pyramidenbau.de>
2017-03-11 10:39:38 -08:00
Ralf Ramsauer
f8f87e3a54 iodine: remove spurious newline
Signed-off-by: Ralf Ramsauer <ralf@ramses-pyramidenbau.de>
2017-03-11 10:39:38 -08:00
Ralf Ramsauer
84ded018cf iodine: add usage for -4 and -6 command line arguments
Those arguments were introduced, but not documented.

Fixes: 619ede5d ("Add options to force IP version for client DNS traffic")
Signed-off-by: Ralf Ramsauer <ralf@ramses-pyramidenbau.de>
2017-03-11 10:39:28 -08:00
Ralf Ramsauer
5fd0874aba iodine: improve help output format
Analogously to the patch for iodined before:
  - remove redundant fprint calls
  - maximum character width: 80 characters (improved readability)
  - add additional newlines

Signed-off-by: Ralf Ramsauer <ralf@ramses-pyramidenbau.de>
2017-03-11 02:17:27 -08:00
Ralf Ramsauer
fe0dbccbc5 iodine/iodined: get rid of redundant local __progname definition
Signed-off-by: Ralf Ramsauer <ralf@ramses-pyramidenbau.de>
2017-03-11 02:17:27 -08:00
Ralf Ramsauer
2efa4dfb35 iodine: consolidate help() and usage()
This avoids redundancies.

Signed-off-by: Ralf Ramsauer <ralf@ramses-pyramidenbau.de>
2017-03-11 02:17:27 -08:00
Ralf Ramsauer
1c86bf347f iodine/iodined: do not print usage if no superuser
There is no value in printing the usage in this case, as the usage
doesn't give the user any hint on how to solve this issue.

Furthermore, replace the Windows implementation with an empty inline
function, which will result in no code.

Signed-off-by: Ralf Ramsauer <ralf@ramses-pyramidenbau.de>
2017-03-11 02:17:27 -08:00
Erik Ekman
9a45c4aa66 Change license wording to follow ISC license exactly
"Permission to use, copy, modify, and distribute this software" is now
"Permission to use, copy, modify, and/or distribute this software".

Add license header to source files missing one.
2014-08-07 21:18:33 +02:00
Erik Ekman
3ebcd29b13 Add support for using an unspecified RR type
Add PRIVATE query type with id 65399 (private use range).
According to RFC3597 the reply data in a query with unspecified RR type must be handled
as unstructured binary data, which means it can contain raw packet data just like the NULL type.
Since the reply format is optimal it is ordered just after NULL in the priority order.
2014-06-09 20:06:36 +02:00
Erik Ekman
1f4b9250cf Check that supplied query type is valid 2014-06-09 18:56:32 +02:00
Erik Ekman
4d7678dc5b Prefix exported functions from client.c 2014-06-09 18:11:16 +02:00
Erik Ekman
a23899513d Remove trailing whitespace 2014-06-01 08:46:54 +02:00
Erik Ekman
388afe3845 Update copyright 2014-06-01 08:46:54 +02:00
Erik Ekman
d0fb85e8cf Do not use 53 as source port for DNS/raw traffic.
For some reason this makes raw traffic get dropped.
2014-05-31 21:20:04 +02:00
Erik Ekman
3914d37c99 Move error message generation into topdomain check method
Change isalpha() to a-z check to avoid locale issues
2014-05-31 10:07:36 +02:00
Erik Ekman
bacb69e4f0 Mark usage() method as noreturn to avoid warning on BSD
Warning from OpenBSD/NetBSD:
  CC iodine.c
  iodine.c: In function 'main':
  iodine.c:141:6: warning: 'nameservaddr_len' may be used uninitialized in this function
2014-05-29 23:21:55 +02:00
Erik Ekman
acd6c37ac1 Fix build after rtable patch 2014-04-06 13:35:09 +02:00
Erik Ekman
eca80f769b Merge branch 'master' of https://github.com/jedisct1/iodine 2014-04-06 13:31:34 +02:00
Erik Ekman
619ede5da8 Add options to force IP version for client DNS traffic 2014-02-10 22:52:31 +01:00
Erik Ekman
f02339b3b2 IPv6: Create single way to format IP addresses 2014-02-06 19:44:26 +01:00
Erik Ekman
a1d88c4f0a IPv6 support for client (#107)
The iodine client now supports both IPv4 and IPv6 nameservers for
sending DNS queries to an IPv4 iodined. The nameserver will
transparently handle translation between IP protocols.

Windows port needs Vista or later to support IPv6.
2014-02-05 22:36:53 +01:00
Erik Ekman
fb9e930fee Print git revision as version 2014-01-29 20:25:45 +01:00
Erik Ekman
a7f491f808 Fix warning, unused variable 'rtable' 2014-01-29 19:12:46 +01:00
Frank Denis
b31e66343a -R only works on OpenBSD. 2013-05-20 10:31:39 -07:00
Pavel Pergamenshchik
85be9b07d1 Missing break in iodine.c command-line parsing
Bug-Ubuntu: https://bugs.launchpad.net/bugs/880508
Author: Pavel Pergamenshchik <ppergame@gmail.com>
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2011-10-23
2012-02-04 22:38:27 +01:00
Laurent Ghigonis
d4849a5dbf Add support for openbsd routing domain, #95 2012-02-04 20:34:05 +01:00
J. A. Bezemer
b177901d38 Applied patch from #88, thanks a lot! 2012-02-04 20:34:04 +01:00
Erik Ekman
1a26a91db3 #82, switch to gethostbyname() for win32 support 2012-02-04 20:34:04 +01:00
Erik Ekman
c5bdf07070 #82 update docs 2012-02-04 20:34:04 +01:00
J. A. Bezemer
3c48602747 merge client code #76 2012-02-04 20:34:04 +01:00
J. A. Bezemer
55cfed9956 update client code #75 2012-02-04 20:34:03 +01:00
Erik Ekman
a1a2e3cefe Refactored to make it easier to add unit tests 2012-02-04 20:34:03 +01:00
Erik Ekman
01e558022e #77, get password from env variable 2012-02-04 20:34:03 +01:00
Erik Ekman
8074696a14 Fix password reading 2012-02-04 20:34:03 +01:00
Erik Ekman
27fdc23433 Split the client code out from the file with the main() func 2012-02-04 20:34:03 +01:00
Erik Ekman
1137ac6ac9 Updated docs 2012-02-04 20:34:03 +01:00
misc
7efdd01ae2 add -F option for writing pid file. Patch from misc@mandriva.org #70 2012-02-04 20:34:03 +01:00
Erik Ekman
2482a42d01 Fixes for unpacking raw packets 2012-02-04 20:34:03 +01:00
Erik Ekman
ef8e3b7ea4 Fix win32 build error 2012-02-04 20:34:03 +01:00
Erik Ekman
cb926cf0c9 Fix some uninitialized variable warnings 2012-02-04 20:34:03 +01:00
Erik Ekman
473bb93951 #36, Send ping message every 20 seconds 2012-02-04 20:34:03 +01:00
Erik Ekman
7e4ee6c470 #36, update printouts 2012-02-04 20:34:03 +01:00
Erik Ekman
ebc1b2f7f8 #36, Use -r to skip raw mode 2012-02-04 20:34:02 +01:00
Erik Ekman
e5370ad95b #36, basic raw mode tunnel works 2012-02-04 20:34:02 +01:00
Erik Ekman
58d9615160 #36, upstream traffic now sent in raw mode 2012-02-04 20:34:02 +01:00