OpenBSD CVS

CVS log for src/sbin/dhclient/parse.c


[BACK] Up to [local] / src / sbin / dhclient

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.83 / (download) - annotate - [select for diffs], Mon Jul 22 17:20:06 2019 UTC (4 years, 10 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, HEAD
Changes since 1.82: +5 -36 lines
Diff to previous 1.82 (colored)

Cleanup/simplify parse_number():

1) Restructure to explicitly set a long long result and take the
desired low/high constraints for strtonum().

2) No need to use a temporary variable when setting long long
(a.k.a. time_t) fields.

3) Fewer magic numbers when processing integer valued option
data. Less memcpy()'ing where a cast or two is sufficient to make
integer assignment work.

No intentional functional change.

Revision 1.82 / (download) - annotate - [select for diffs], Sun Jul 21 15:59:51 2019 UTC (4 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.81: +8 -7 lines
Diff to previous 1.81 (colored)

Restructure parse_semi() so it resembles the other parse_*
functions.

Revision 1.81 / (download) - annotate - [select for diffs], Sun Jul 21 15:47:02 2019 UTC (4 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.80: +4 -7 lines
Diff to previous 1.80 (colored)

Replace malloc()/memcpy() with strdup() in parse_string(). Nuke 'len' parameter
to parse_string() in favour of taking strlen() of resulting string in the few
cases that it is of interest.

Revision 1.80 / (download) - annotate - [select for diffs], Tue Mar 19 23:57:30 2019 UTC (5 years, 2 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.79: +2 -2 lines
Diff to previous 1.79 (colored)

Parsing error messages display only the first 80 characters of the
offending line. It is fruitless to try to position the "^" at a
character more than 80 characters from the start of the line.

Revision 1.79 / (download) - annotate - [select for diffs], Thu Jan 4 03:02:05 2018 UTC (6 years, 5 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.78: +1 -26 lines
Diff to previous 1.78 (colored)

parse_lease_time() is an unnecessary abstraction. Just use
parse_number('L') since it is parsing unsigned 32bit integers.

Revision 1.78 / (download) - annotate - [select for diffs], Thu Jan 4 02:27:55 2018 UTC (6 years, 5 months ago) by krw
Branch: MAIN
Changes since 1.77: +2 -2 lines
Diff to previous 1.77 (colored)

We only parse decimal numbers, so parse_decimal() -> parse_number() to
match grammar comments and improve euphony.

Revision 1.77 / (download) - annotate - [select for diffs], Thu Nov 9 12:34:25 2017 UTC (6 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.76: +1 -60 lines
Diff to previous 1.76 (colored)

Use lease 'epoch' (time lease was acquired) to calculate timers for
renew/rebind/expiry. Treat renew/rebind/expiry statements in leases as
comments for human consumption.

Revision 1.76 / (download) - annotate - [select for diffs], Mon Nov 6 12:51:53 2017 UTC (6 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.75: +6 -1 lines
Diff to previous 1.75 (colored)

Add format 't' to parse_decimal() for signed 64-bit
integers.

Revision 1.75 / (download) - annotate - [select for diffs], Mon Oct 23 13:15:57 2017 UTC (6 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.74: +2 -2 lines
Diff to previous 1.74 (colored)

Use same parse_warn() verbiage in parse_lease_time() as that
emitted when other unsigned 32-bit values are parsed. i.e.
"expecting integer between 0 and 4294967295". No need to
make people google what "unsigned 32-bit decimal value" means.

Revision 1.74 / (download) - annotate - [select for diffs], Thu Oct 19 13:44:31 2017 UTC (6 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.73: +1 -10 lines
Diff to previous 1.73 (colored)

Nuke special case for '\n' in skip_to_semi() and
associated weird comment about parsing resolv.conf.

dhclient.conf and dhclient.leases.<if> are semi-colon
oriented and not line oriented. '\n' is never returned
by get_token().

Revision 1.73 / (download) - annotate - [select for diffs], Sat Oct 14 15:31:46 2017 UTC (6 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.72: +1 -22 lines
Diff to previous 1.72 (colored)

Refactor parsing of hex sequences. Rename parse_X()
to parse_hex_octets() and have it return 0/1 to indicate success,
to not touch existing data on error paths, to handle ';'
better, emit single error message ("expecting colon
delimited list of hex octets."). Fold parse_hex() into
parse_hex_octets().

Simplify logic in parse_option_decl() to eliminate duplicate
overflow error checking and error messages as a result.

Revision 1.72 / (download) - annotate - [select for diffs], Thu Oct 12 13:10:13 2017 UTC (6 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.71: +20 -21 lines
Diff to previous 1.71 (colored)

Make parse_string() toe the new line by returning
0 for failure, 1 for success, emitting a
single error message ("expecting string.") and
handling ';' better.

Don't leak memory when encountering pathological
config or lease files containing repeated instances
of an option or command with string data.

Revision 1.71 / (download) - annotate - [select for diffs], Wed Oct 11 22:57:00 2017 UTC (6 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.70: +4 -2 lines
Diff to previous 1.70 (colored)

Works better when both files in a diff are
committed.

Revision 1.70 / (download) - annotate - [select for diffs], Wed Oct 11 15:06:27 2017 UTC (6 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.69: +17 -14 lines
Diff to previous 1.69 (colored)

Tweak parse_date() again, this time to factor
code in the same way as the other parse_*()
functions. Whitespace fix in comment while
passing. Also conform to idiom that original
data is not changed in the error path.

Revision 1.69 / (download) - annotate - [select for diffs], Wed Oct 11 10:14:15 2017 UTC (6 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.68: +18 -8 lines
Diff to previous 1.68 (colored)

Tweak parse_decimal() and its invocations to emit a
single error message ("expecting integer between x and y")
and to properly handle ';' in error cases.

Revision 1.68 / (download) - annotate - [select for diffs], Tue Oct 10 14:01:08 2017 UTC (6 years, 8 months ago) by krw
Branch: MAIN
Changes since 1.67: +5 -1 lines
Diff to previous 1.67 (colored)

Tweak parse_boolean() to be more like its friends.
i.e. handle ';' better, and issue error
message ("expecting boolean.") itself.

Revision 1.67 / (download) - annotate - [select for diffs], Tue Oct 10 13:37:00 2017 UTC (6 years, 8 months ago) by krw
Branch: MAIN
Changes since 1.66: +30 -25 lines
Diff to previous 1.66 (colored)

Tweak parse_cidr() to be more like its friends.
i.e. handle ';' better, and issue only one error
message ("expecting IPv4 CIDR block").

One gratuitous whitespace tweak tossed in.

Revision 1.66 / (download) - annotate - [select for diffs], Mon Oct 9 21:33:11 2017 UTC (6 years, 8 months ago) by krw
Branch: MAIN
Changes since 1.65: +15 -9 lines
Diff to previous 1.65 (colored)

Tweak parse_lease_time() to emit a single message on
failure ("expecting unsigned 32-bit decimal value") and to
properly handle the terminating ';' in error situations.

Make parse_lease_time() return an int to indicate success
or failure as its friends do. Also avoid swapping endianess
twice.

Use == 1 vs != 0 when checking parse_ip_addr() return
value.

Revision 1.65 / (download) - annotate - [select for diffs], Mon Oct 9 18:02:43 2017 UTC (6 years, 8 months ago) by krw
Branch: MAIN
Changes since 1.64: +24 -21 lines
Diff to previous 1.64 (colored)

Tweak parse_ip_addr() to emit a single message on
failure ("expecting IPv4 address") and to properly
handle the terminating ';' in error situations.

Revision 1.64 / (download) - annotate - [select for diffs], Sun Oct 8 17:35:56 2017 UTC (6 years, 8 months ago) by krw
Branch: MAIN
Changes since 1.63: +22 -32 lines
Diff to previous 1.63 (colored)

Simply parse_date() by trusting strptime() more and omitting
pointlessly precise error messages in favour of 'expecting
UTC time'.

Revision 1.63 / (download) - annotate - [select for diffs], Sun Sep 17 22:14:53 2017 UTC (6 years, 8 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.62: +4 -4 lines
Diff to previous 1.62 (colored)

Oops. Missed a file.

Create global 'log_procname' and set it to '<ifname>' or
'<ifname> [priv]' as appropriate for the process doing the
setting. Use it as the prefix in all log_*() output. Makes
tracking messages for an interface or a process much easier.

Revision 1.62 / (download) - annotate - [select for diffs], Thu Sep 14 00:10:17 2017 UTC (6 years, 8 months ago) by krw
Branch: MAIN
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (colored)

Strive to rationalize fatal[x]() usage and
verbiage.

Revision 1.61 / (download) - annotate - [select for diffs], Mon Jul 24 16:17:35 2017 UTC (6 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.60: +4 -3 lines
Diff to previous 1.60 (colored)

Tweak some comments

Revision 1.60 / (download) - annotate - [select for diffs], Fri Jul 14 16:21:03 2017 UTC (6 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.59: +11 -11 lines
Diff to previous 1.59 (colored)

Replace remaining "!var" expressions with
"<var> == 0", "!(<var> & FLAG)" with
"(<var> & FLAG) == 0", "!<func()>"
with "<func()> == 0" and "!<define>" with
"<define> == 0". And the positive cases
as well.

A few stray == NULL and != NULL as well.

Revision 1.59 / (download) - annotate - [select for diffs], Fri Jul 14 14:03:15 2017 UTC (6 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.58: +2 -2 lines
Diff to previous 1.58 (colored)

Replace remaining "!<pointer>" expressions with
"<pointer> == NULL". And of course "<pointer>"
expressions with "<pointer> != NULL".

Revision 1.58 / (download) - annotate - [select for diffs], Mon Jul 10 00:47:47 2017 UTC (6 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.57: +24 -24 lines
Diff to previous 1.57 (colored)

Use a modern spacious idiom on all function local variable
declarations.

Revision 1.57 / (download) - annotate - [select for diffs], Sun Jul 9 19:19:58 2017 UTC (6 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.56: +26 -26 lines
Diff to previous 1.56 (colored)

Be consistent. "return (e);" -> "return e;"

Revision 1.56 / (download) - annotate - [select for diffs], Sun Jul 9 18:45:27 2017 UTC (6 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.55: +24 -1 lines
Diff to previous 1.55 (colored)

Some parsing code cleanup: add parse_boolean(); pass literal format
chars to parse_decimal() instead of less obvious *fmt; refactor
to eliminate need for the 'alloc:' and 'bad_flag:' labels and the
invidious backwards goto's to them.

Revision 1.55 / (download) - annotate - [select for diffs], Sat Jul 8 00:36:10 2017 UTC (6 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)

Always use uintNN_t instead of sometimes u_intNN_t
and sometimes uintNN_t.

Revision 1.54 / (download) - annotate - [select for diffs], Thu Jun 29 21:37:43 2017 UTC (6 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.53: +1 -38 lines
Diff to previous 1.53 (colored)

Nuke undocumented long-deprecated and/or unsupported lease
fields 'hardware', 'alias', 'media', 'medium', 'ethernet'.

Also remove now-unused parse_ethernet().

Making these parsing failures will smoke out anybody with
leases or conf files from the last century.

Revision 1.53 / (download) - annotate - [select for diffs], Thu Jun 22 15:08:53 2017 UTC (6 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.52: +3 -9 lines
Diff to previous 1.52 (colored)

Drop support for old (>4yr) timestamp formats in leases
files.

ok tb@ millert@

Revision 1.52 / (download) - annotate - [select for diffs], Mon Jun 19 19:28:35 2017 UTC (6 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.51: +2 -2 lines
Diff to previous 1.51 (colored)

Various KNF nits.

Revision 1.51 / (download) - annotate - [select for diffs], Sat Jun 10 17:56:29 2017 UTC (7 years ago) by krw
Branch: MAIN
Changes since 1.50: +1 -5 lines
Diff to previous 1.50 (colored)

Nuke unused global warnings_occurred.

Revision 1.50 / (download) - annotate - [select for diffs], Sun Apr 9 20:44:13 2017 UTC (7 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.49: +3 -3 lines
Diff to previous 1.49 (colored)

Seven casts, a couple of tweaks and CFLAGS+=-Wsign-compare for the
win.

No intentional functional change.

Revision 1.49 / (download) - annotate - [select for diffs], Sat Apr 8 20:16:04 2017 UTC (7 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.48: +3 -3 lines
Diff to previous 1.48 (colored)

Reduce the overburden of signed vs unsigned comparisons by sprinkling
'int' -> 'unsigned int' (and visa versa) where obvious.

Steal a couple of 'unsigned' -> u_int32_t from reyk@'s dhcrelay
tweaks.

No intentional functional change.

Revision 1.48 / (download) - annotate - [select for diffs], Mon Apr 3 19:59:39 2017 UTC (7 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.47: +4 -2 lines
Diff to previous 1.47 (colored)

Change parse_string() to take an optional integer pointer that can
be used to return the final size of the parsed (i.e. un-vis'ed)
string. Use same, plus memcpy() to ensure entire final string is
copied to intended destination even if there are embedded NULs.

Revision 1.47 / (download) - annotate - [select for diffs], Mon Apr 3 18:23:36 2017 UTC (7 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.46: +12 -3 lines
Diff to previous 1.46 (colored)

Simplify read_string() to just read the characters between the '"'s.
Push the un-vising up to parse_string(). This allows both the actual
string and the un-vised version to be available as desired. Use
memcpy() instead of strdup() to copy un-vised string since it may
legitimately contain NUL.

Revision 1.46 / (download) - annotate - [select for diffs], Mon Apr 3 15:34:46 2017 UTC (7 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.45: +1 -8 lines
Diff to previous 1.45 (colored)

Tweak parse_string() to not consume the ';'. Simplifies/shortens
some logic.

Revision 1.45 / (download) - annotate - [select for diffs], Mon Apr 3 14:16:34 2017 UTC (7 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.44: +6 -6 lines
Diff to previous 1.44 (colored)

Tweak 'expecting' parse_warn() messages to be more consistent.

Revision 1.44 / (download) - annotate - [select for diffs], Sun Apr 2 20:57:22 2017 UTC (7 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

Change parse_string() warning from "filename must be a string" to
"expecting a string". Things other than filenames are parsed here.

Revision 1.43 / (download) - annotate - [select for diffs], Wed Feb 15 20:00:16 2017 UTC (7 years, 3 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.42: +12 -36 lines
Diff to previous 1.42 (colored)

Use new log.[ch] functions in parse_warn().

Simplify the "^" placing logic and make it apply to log entries as
well as terminal output.

Since dhclient(8) can be re-exec'd for various reasons after going
daemon, make sure we don't try to log to stderr if it isn't a TTY.

Revision 1.42 / (download) - annotate - [select for diffs], Sun Feb 12 13:15:50 2017 UTC (7 years, 3 months ago) by krw
Branch: MAIN
Changes since 1.41: +6 -3 lines
Diff to previous 1.41 (colored)

Switch from 'legacy' errwarn.c to standard daemon logging functions.

No objections heard. Feedback from millert@ guenther@

Revision 1.41 / (download) - annotate - [select for diffs], Sat Feb 11 16:12:36 2017 UTC (7 years, 3 months ago) by krw
Branch: MAIN
Changes since 1.40: +49 -1 lines
Diff to previous 1.40 (colored)

Move parse_warning() into parse.c to prepare to replace errwarn.c
with standard daemon log.[ch].

ok mpi@

Revision 1.40 / (download) - annotate - [select for diffs], Sat Feb 6 19:30:52 2016 UTC (8 years, 4 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.39: +16 -1 lines
Diff to previous 1.39 (colored)

Eliminate #include inside *.h files and include only needed headers in
each *.c file.

Inspired by mention of header silliness by Edgar Pettijohn and mmcc@
on tech@.

Revision 1.39 / (download) - annotate - [select for diffs], Mon May 18 17:51:21 2015 UTC (9 years ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.38: +2 -1 lines
Diff to previous 1.38 (colored)

Tweak parsing so that hostnames starting with 0-9 are accepted.

Reported long ago by matthieu@. Also Jacob Berkman via the lists.

Tests and suggestions from Jacob and Matthieu.

Revision 1.38 / (download) - annotate - [select for diffs], Mon May 5 18:02:49 2014 UTC (10 years, 1 month ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.37: +6 -6 lines
Diff to previous 1.37 (colored)

Zap trailing whitespace. Started by pointed comments from andre@.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Jan 21 03:07:50 2014 UTC (10 years, 4 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.36: +40 -1 lines
Diff to previous 1.36 (colored)

Add parsing for options 121 (classless-static-routes) and 249
(classless-ms-static-routes). dhcpd can now specify and serve
these options and dhclient can recognize and use supersede, etc.
statements on them.

Based on a diff from Stefan Rinke. Thanks!

Revision 1.36 / (download) - annotate - [select for diffs], Sun Jan 19 21:10:04 2014 UTC (10 years, 4 months ago) by krw
Branch: MAIN
Changes since 1.35: +1 -11 lines
Diff to previous 1.35 (colored)

We don't have any (and I can't find elsewhere) signed 16 bit or
signed 8 bit dhcp option types. So nuke getShort() and all 's' and
'b' format support. While here use '%u'/'%lu' and not
'%d'/'%ld' to snprintf() unsigned values.

Revision 1.35 / (download) - annotate - [select for diffs], Sun Jan 19 08:25:54 2014 UTC (10 years, 4 months ago) by krw
Branch: MAIN
Changes since 1.34: +112 -142 lines
Diff to previous 1.34 (colored)

Redo the parsing of numbers to improve the error messages and
make the code more readable. And prepare for some new things
that will need to be parsed.

ok dlg@

Revision 1.34 / (download) - annotate - [select for diffs], Sun Jan 19 04:36:04 2014 UTC (10 years, 4 months ago) by krw
Branch: MAIN
Changes since 1.33: +3 -4 lines
Diff to previous 1.33 (colored)

Rename parse_hardware_param() to parse_ethernet() to reflect what
it actually does.

Revision 1.33 / (download) - annotate - [select for diffs], Sat Jan 18 01:03:56 2014 UTC (10 years, 4 months ago) by krw
Branch: MAIN
Changes since 1.32: +4 -4 lines
Diff to previous 1.32 (colored)

Make parse_warn() messages consistantly use 'expecting' rather
than occasionally 'expected'. End all with a '.'.

Revision 1.32 / (download) - annotate - [select for diffs], Sat Jan 18 00:51:55 2014 UTC (10 years, 4 months ago) by krw
Branch: MAIN
Changes since 1.31: +7 -4 lines
Diff to previous 1.31 (colored)

Never silently consume the following statement when unexpectedly
encountering a ';'. I.e. when checking the token type, 'skip_to_semi()'
after 'parse_warn()' only when the parsed token wasn't a ';'.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Jan 13 23:42:18 2014 UTC (10 years, 4 months ago) by krw
Branch: MAIN
Changes since 1.30: +2 -6 lines
Diff to previous 1.30 (colored)

peek_token() a bit more to replace a bunch of manual checks with
the perfectly adequate parse_semi(). And some blocks didn't even
need to peek.

Revision 1.30 / (download) - annotate - [select for diffs], Mon Jan 13 20:56:24 2014 UTC (10 years, 4 months ago) by krw
Branch: MAIN
Changes since 1.29: +4 -3 lines
Diff to previous 1.29 (colored)

Don't eat two tokens when encountering a non-terminal '}'. Avoids
possibly ignoring entire rest of dhclient.conf or dhclient.leases.if
looking for a mistakenly consumed '}'.

Revision 1.29 / (download) - annotate - [select for diffs], Fri Jan 10 01:38:15 2014 UTC (10 years, 5 months ago) by krw
Branch: MAIN
Changes since 1.28: +3 -2 lines
Diff to previous 1.28 (colored)

Yet another annoyingly long line.

Revision 1.28 / (download) - annotate - [select for diffs], Fri Dec 6 23:40:48 2013 UTC (10 years, 6 months ago) by krw
Branch: MAIN
Changes since 1.27: +6 -11 lines
Diff to previous 1.27 (colored)

Having stopped pretending we handle anything but ethernet packets,
replace the 'struct hardware' abstraction layer and use 'struct
ether_addr' where hardware addresses are of interest.

ok matthew@, confirmed by reyk@ not to impact DHCP-over-IPSec support.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Dec 5 22:31:35 2013 UTC (10 years, 6 months ago) by krw
Branch: MAIN
Changes since 1.26: +1 -9 lines
Diff to previous 1.26 (colored)

Stop pretending we still support FDDI or token ring hardware types.

idea ok deraadt@ matthew@

Revision 1.26 / (download) - annotate - [select for diffs], Wed Nov 20 17:22:46 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.25: +3 -2 lines
Diff to previous 1.25 (colored)

cleanups for signed char vs ctype
ok krw

Revision 1.25 / (download) - annotate - [select for diffs], Mon Nov 11 21:00:01 2013 UTC (10 years, 6 months ago) by krw
Branch: MAIN
Changes since 1.24: +3 -1 lines
Diff to previous 1.24 (colored)

Shuffle function prototypes and extern declarations around to
put local functions prototypes and variables in their .c files, and
cross-file functions into .h files. Prompted by deraadt@.

Revision 1.24 / (download) - annotate - [select for diffs], Thu May 2 16:35:27 2013 UTC (11 years, 1 month ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

Bunch of comment/whitespace cleanup. Eliminate some misleading or
pointless ones, make multiline comments readable, nuke '...' in
favour of '.', etc.

Revision 1.23 / (download) - annotate - [select for diffs], Sat Apr 27 17:54:24 2013 UTC (11 years, 1 month ago) by krw
Branch: MAIN
Changes since 1.22: +47 -138 lines
Diff to previous 1.22 (colored)

Use same parse_date() and date writing logic as in dhcpd. i.e.
strptime() rather than handrolling parsing. Change date format
in leases to same as dhcpd, fixing 'u' vs 'w' error made in
initial strftime() introduction.

Revision 1.22 / (download) - annotate - [select for diffs], Tue Apr 2 02:37:41 2013 UTC (11 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.21: +4 -3 lines
Diff to previous 1.21 (colored)

Don't assume sizeof(time_t)==4

ok krw@

Revision 1.21 / (download) - annotate - [select for diffs], Thu Nov 8 21:32:55 2012 UTC (11 years, 7 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.20: +3 -5 lines
Diff to previous 1.20 (colored)

Remove confusing extra address abstraction 'struct iaddr'. Just use
'in_addr'. Remove many double conversions and other perversions.
piaddr() replaced with inet_ntoa(). dhclient is extremely unlikely
to support anything but ipv4/dhcp without a complete rewrite.

Joint work with chris@.

Positive feedback from deraadt@ zinke@ phessler@.

Revision 1.20 / (download) - annotate - [select for diffs], Sat Dec 10 17:15:27 2011 UTC (12 years, 6 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.19: +9 -12 lines
Diff to previous 1.19 (colored)

Tweak parsing. No need to declare, assign and then ignore the token
value when only the token id is required.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Jun 26 21:14:10 2010 UTC (13 years, 11 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.18: +2 -3 lines
Diff to previous 1.18 (colored)

malloc/strlcpy -> strdup. Apparently I forgot to commit this one with
the similar changes to dhcpd.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Jan 8 13:34:38 2007 UTC (17 years, 5 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.17: +4 -2 lines
Diff to previous 1.17 (colored)

Don't leak strings.

ok miod@

Revision 1.17 / (download) - annotate - [select for diffs], Wed Nov 22 21:35:56 2006 UTC (17 years, 6 months ago) by stevesk
Branch: MAIN
Changes since 1.16: +14 -14 lines
Diff to previous 1.16 (colored)

sync dhclient and dhcpd parse.c areas where we can.
mainly formatting, whitespace; ok henning@

Revision 1.16 / (download) - annotate - [select for diffs], Wed Nov 22 18:07:52 2006 UTC (17 years, 6 months ago) by stevesk
Branch: MAIN
Changes since 1.15: +5 -5 lines
Diff to previous 1.15 (colored)

fix some warning messages and comments in parse_date(); ok henning@

Revision 1.15 / (download) - annotate - [select for diffs], Tue Nov 21 17:29:27 2006 UTC (17 years, 6 months ago) by stevesk
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

remove spurious ; after bracket, no binary change

Revision 1.14 / (download) - annotate - [select for diffs], Tue Apr 18 19:17:54 2006 UTC (18 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.13: +37 -37 lines
Diff to previous 1.13 (colored)

cleanup keyword lookup for the lexer, and remove keywords not valid in
either dhclient or dhcpd context; tested by many

Revision 1.13 / (download) - annotate - [select for diffs], Sun Jul 17 19:33:55 2005 UTC (18 years, 10 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.12: +32 -108 lines
Diff to previous 1.12 (colored)

Insist on correct hardware addresses in dhclient.conf and
dhclient.leases.<if> files. Simplify parse_numeric_aggregate() as
a result, rendering tree.c and tree.h redundant.

ok millert@

Revision 1.12 / (download) - annotate - [select for diffs], Sat Jul 16 16:19:23 2005 UTC (18 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.11: +13 -13 lines
Diff to previous 1.11 (colored)

NULL is not a time_t. From brooks at freebsd.

Revision 1.11 / (download) - annotate - [select for diffs], Wed May 5 23:07:47 2004 UTC (20 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.10: +8 -11 lines
Diff to previous 1.10 (colored)

knf

Revision 1.10 / (download) - annotate - [select for diffs], Tue May 4 22:23:01 2004 UTC (20 years, 1 month ago) by mickey
Branch: MAIN
Changes since 1.9: +8 -8 lines
Diff to previous 1.9 (colored)

do not overload libc function names causing linker troubles

Revision 1.9 / (download) - annotate - [select for diffs], Tue May 4 21:48:16 2004 UTC (20 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.8: +8 -13 lines
Diff to previous 1.8 (colored)

knf

Revision 1.8 / (download) - annotate - [select for diffs], Tue May 4 20:28:40 2004 UTC (20 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.7: +1 -58 lines
Diff to previous 1.7 (colored)

remove things not used, spotted by lint mostly; ok henning

Revision 1.7 / (download) - annotate - [select for diffs], Tue Feb 24 13:08:26 2004 UTC (20 years, 3 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

cut more crap - no binary change

Revision 1.6 / (download) - annotate - [select for diffs], Mon Feb 23 20:09:02 2004 UTC (20 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

remove time_t related crud; henning ok

Revision 1.5 / (download) - annotate - [select for diffs], Sat Feb 7 13:59:45 2004 UTC (20 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.4: +9 -9 lines
Diff to previous 1.4 (colored)

KNF

Revision 1.4 / (download) - annotate - [select for diffs], Sat Feb 7 13:26:35 2004 UTC (20 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.3: +8 -8 lines
Diff to previous 1.3 (colored)

more KNF From: Emil Mikulic <emikulic@dmr.ath.cx>
great job.
no binary change.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Feb 6 11:33:22 2004 UTC (20 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.2: +300 -299 lines
Diff to previous 1.2 (colored)

more Knall & Rauch -> ANSI C, KNF and stuff that makes this a bit more
readable. no effect on the binary.
From: Emil Mikulic <emikulic@dmr.ath.cx>

Revision 1.2 / (download) - annotate - [select for diffs], Wed Feb 4 12:16:56 2004 UTC (20 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

$OpenBSD$, tedu

Revision 1.1 / (download) - annotate - [select for diffs], Sun Jan 18 01:26:20 2004 UTC (20 years, 4 months ago) by deraadt
Branch: MAIN

this is where dhclient will start surgery

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.