OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.50 / (download) - annotate - [select for diffs], Sat Jan 26 23:26:20 2019 UTC (5 years, 4 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, OPENBSD_6_5_BASE, OPENBSD_6_5, HEAD
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored)

Rename ACTION_NONE to ACTION_USELEASE. TOK_NOACTION to TOK_USELEASE.
More consistent, clearer.

Revision 1.49 / (download) - annotate - [select for diffs], Sat Jan 26 22:55:10 2019 UTC (5 years, 4 months ago) by krw
Branch: MAIN
Changes since 1.48: +3 -2 lines
Diff to previous 1.48 (colored)

Add 'uselease' statement to allow the disabling of built-in or
previously specified 'append', 'default', 'ignore', 'prepend', or
'supersede' actions on the values provided in leases.

Revision 1.48 / (download) - annotate - [select for diffs], Mon Nov 6 13:27:19 2017 UTC (6 years, 7 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.47: +2 -1 lines
Diff to previous 1.47 (colored)

Add lease declaration 'epoch' to hold the time() when a lease is
received. Set it in packet_to_lease() and preserve it in
apply_defaults(). Otherwise not used, documented or printed in lease
database yet.

Revision 1.47 / (download) - annotate - [select for diffs], Mon Oct 23 13:31:35 2017 UTC (6 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.46: +5 -5 lines
Diff to previous 1.46 (colored)

Use 'for (;;)' instead of a mix of "while (1) {}" and
"do {} while (1)".

Revision 1.46 / (download) - annotate - [select for diffs], Fri Oct 20 15:03:16 2017 UTC (6 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored)

prev_line and cur_line can be static.

Revision 1.45 / (download) - annotate - [select for diffs], Fri Oct 20 14:55:12 2017 UTC (6 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.44: +48 -17 lines
Diff to previous 1.44 (colored)

Split eol() from get_char() so that token assmebly that is
terminated by a '\n' can generate error messages pointing
at the offending token, rather than pointing at a blank
line.

Revision 1.44 / (download) - annotate - [select for diffs], Thu Oct 5 14:19:16 2017 UTC (6 years, 8 months ago) by krw
Branch: MAIN
Changes since 1.43: +1 -2 lines
Diff to previous 1.43 (colored)

'DENY' is a dhcpd-only thing. No need to parse it in
dhclient.conf.

Revision 1.43 / (download) - annotate - [select for diffs], Fri Jul 14 16:21:03 2017 UTC (6 years, 10 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.42: +15 -14 lines
Diff to previous 1.42 (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.42 / (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.41: +9 -9 lines
Diff to previous 1.41 (colored)

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

Revision 1.41 / (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.40: +10 -10 lines
Diff to previous 1.40 (colored)

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

Revision 1.40 / (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.39: +1 -6 lines
Diff to previous 1.39 (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.39 / (download) - annotate - [select for diffs], Sat Jun 10 17:56:29 2017 UTC (7 years ago) by krw
Branch: MAIN
Changes since 1.38: +1 -3 lines
Diff to previous 1.38 (colored)

Nuke unused global warnings_occurred.

Revision 1.38 / (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.37: +2 -2 lines
Diff to previous 1.37 (colored)

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

No intentional functional change.

Revision 1.37 / (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.36: +3 -2 lines
Diff to previous 1.36 (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.36 / (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.35: +7 -11 lines
Diff to previous 1.35 (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.35 / (download) - annotate - [select for diffs], Sun Feb 12 13:15:50 2017 UTC (7 years, 3 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.34: +2 -1 lines
Diff to previous 1.34 (colored)

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

No objections heard. Feedback from millert@ guenther@

Revision 1.34 / (download) - annotate - [select for diffs], Tue Aug 16 21:57:51 2016 UTC (7 years, 9 months ago) by krw
Branch: MAIN
Changes since 1.33: +2 -1 lines
Diff to previous 1.33 (colored)

Track SSID in leases file and only consider leases from the current SSID when
starting up dhclient on wifi interfaces. In theory will preserve leases from
other SSID's and speed up obtaining a lease by not wasting time attempting
to re-acquire a lease from a different SSID.

Experimental feature from n2k16 needing some real world testing before g2k16.

Revision 1.33 / (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.32: +19 -3 lines
Diff to previous 1.32 (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.32 / (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.31: +23 -41 lines
Diff to previous 1.31 (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.31 / (download) - annotate - [select for diffs], Sat May 2 14:29:32 2015 UTC (9 years, 1 month ago) by krw
Branch: MAIN
Changes since 1.30: +3 -9 lines
Diff to previous 1.30 (colored)

Hoist common assignments out of a series of if/if-else statements
in get_token(). Simplifies code and shrinks future diff.

No intentional functional change.

Revision 1.30 / (download) - annotate - [select for diffs], Sat May 2 12:37:35 2015 UTC (9 years, 1 month ago) by krw
Branch: MAIN
Changes since 1.29: +3 -3 lines
Diff to previous 1.29 (colored)

Correct switch between current and previous line buffers when
encountering a carriage return in the input.

Found by jsg@ a long time ago in a respository far, far away.

Revision 1.29 / (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.28: +2 -2 lines
Diff to previous 1.28 (colored)

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

Revision 1.28 / (download) - annotate - [select for diffs], Sun Jan 19 03:54:25 2014 UTC (10 years, 4 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.27: +6 -3 lines
Diff to previous 1.27 (colored)

Adjust lexchar position by ugflag once only.

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

If ugflag (indicating a character from the file being parsed has been
unget()'ed) is set, then properly set the lexchar position back one in
get_token() so more error messages put the '^' in the proper spot.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Dec 18 00:37:59 2013 UTC (10 years, 5 months ago) by krw
Branch: MAIN
Changes since 1.25: +22 -10 lines
Diff to previous 1.25 (colored)

Code existed to print non-printable characters in strings written
to the leases file. No code existed to correctly read back the
strings so written.

Redo both sides and use vis()/strnunvis() instead of handrolling
more parsing. As a side-effect allow embedded NUL characters rather
than skipping them.

Revision 1.25 / (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.24: +2 -4 lines
Diff to previous 1.24 (colored)

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

idea ok deraadt@ matthew@

Revision 1.24 / (download) - annotate - [select for diffs], Tue Nov 12 04:59:00 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.23: +3 -1 lines
Diff to previous 1.23 (colored)

add a variety of missing prototypes

Revision 1.23 / (download) - annotate - [select for diffs], Tue Oct 22 18:15:58 2013 UTC (10 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.22: +2 -1 lines
Diff to previous 1.22 (colored)

Save 'next-server' (a.k.a. siaddr) info in leases file. Saving the
file name without the server address seems silly.

Tested & ok uwe@

Revision 1.22 / (download) - annotate - [select for diffs], Sun Jun 9 01:51:58 2013 UTC (11 years ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.21: +17 -22 lines
Diff to previous 1.21 (colored)

Add back backslash fixes caught in rollback.

Revision 1.21 / (download) - annotate - [select for diffs], Sun Jun 9 00:30:06 2013 UTC (11 years ago) by krw
Branch: MAIN
Changes since 1.20: +22 -17 lines
Diff to previous 1.20 (colored)

Backout static/classless route handling and default route refactoring
since the former relies on the latter and the latter breaks 'egress'
group populating.

Revision 1.20 / (download) - annotate - [select for diffs], Tue Jun 4 13:00:07 2013 UTC (11 years ago) by krw
Branch: MAIN
Changes since 1.19: +17 -22 lines
Diff to previous 1.19 (colored)

Fix "\" escape handling in read_string().

Problem noted, fix tested and ok sthen@.

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

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

Revision 1.18 / (download) - annotate - [select for diffs], Thu Nov 15 14:54:18 2012 UTC (11 years, 6 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.17: +1 -3 lines
Diff to previous 1.17 (colored)

Shuffle #include's to use the majority idiom everywhere - i.e. use
dhcpd.h to pull in most sys/net/netinet/etc. .h file. Eliminate
superfluous #include's.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Nov 7 15:20:28 2012 UTC (11 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.16: +4 -4 lines
Diff to previous 1.16 (colored)

Use memset() consistently rather than tossing in a few bzero()'s.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Oct 30 18:39:44 2012 UTC (11 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.15: +1 -2 lines
Diff to previous 1.15 (colored)

Nuke dhclient-script and dhclient.conf 'script' directive. Do all
interface and route configuration via ioctl's and routing sockets.

This will break configurations using local enhancements of
dhclient-script, which will now require alternate arrangements.

Committing early to allow time to identify and develop required
alternatives.

Several proddings by deraadt@.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Aug 22 00:14:42 2012 UTC (11 years, 9 months ago) by tedu
Branch: MAIN
Changes since 1.14: +2 -1 lines
Diff to previous 1.14 (colored)

add ignore keyword to conf file, allowing one to ignore unwanted info
from the server without necessarily speciyfing a supersede value

Revision 1.14 / (download) - annotate - [select for diffs], Sat Dec 10 17:36:40 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.13: +16 -3 lines
Diff to previous 1.13 (colored)

Try harder to re-initialize parsing state so nothing accidentally
carries over when a new file (i.e. leases after config) is parsed.
May help with mysterious "Corrupt lease file" messages.

Revision 1.13 / (download) - annotate - [select for diffs], Sun Dec 17 17:41:56 2006 UTC (17 years, 5 months ago) by stevesk
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, 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.12: +2 -2 lines
Diff to previous 1.12 (colored)

fix comment

Revision 1.12 / (download) - annotate - [select for diffs], Mon May 8 17:25:59 2006 UTC (18 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.11: +2 -1 lines
Diff to previous 1.11 (colored)

add 'link-timeout n' seconds option to grammer, from fkr@hazardous.org
default remains 10 seconds.

Revision 1.11 / (download) - annotate - [select for diffs], Tue Apr 18 19:17:54 2006 UTC (18 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.10: +55 -214 lines
Diff to previous 1.10 (colored)

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

Revision 1.10 / (download) - annotate - [select for diffs], Tue Aug 2 18:26:49 2005 UTC (18 years, 10 months ago) by moritz
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.9: +2 -1 lines
Diff to previous 1.9 (colored)

add missing break; ok henning@

Revision 1.9 / (download) - annotate - [select for diffs], Tue Jul 26 19:14:57 2005 UTC (18 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

Fix buffer overflows in dhcpd and dhclient. Closes PR#4306.

ok henning@

Revision 1.8 / (download) - annotate - [select for diffs], Sat Jul 9 16:16:11 2005 UTC (18 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.7: +2 -3 lines
Diff to previous 1.7 (colored)

Clean out a few more unused/uninitialized variables.

ok millert@

Revision 1.7 / (download) - annotate - [select for diffs], Wed Sep 15 19:02:38 2004 UTC (19 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.6: +2 -3 lines
Diff to previous 1.6 (colored)

variable set but not used

Revision 1.6 / (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_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

cut more crap - no binary change

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

more style fixes from Emil Mikulic <emikulic@dmr.ath.cx>
Thank you very much for this excellent work, it helps a lot.
binary unchanged.
I am still convinced dhclient can be made readable.

Revision 1.4 / (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.3: +2 -2 lines
Diff to previous 1.3 (colored)

$OpenBSD$, tedu

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

more KNF

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

8579 lines of KNF, ANSO and zap-junk diff without the resulting binary
changing by a single byte.
partly from theo

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.