Up to [local] / src / sbin / dhclient
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.70 / (download) - annotate - [select for diffs], Sat Nov 21 18:34:25 2020 UTC (3 years, 6 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,
HEAD
Changes since 1.69: +2 -2 lines
Diff to previous 1.69 (colored)
No need to update resolv.conf when renewing a lease does not result in any configuration changges.
Revision 1.69 / (download) - annotate - [select for diffs], Thu May 28 15:23:46 2020 UTC (4 years ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE,
OPENBSD_6_8
Changes since 1.68: +2 -2 lines
Diff to previous 1.68 (colored)
Reduce 'ifa' overloading by renaming proposal field from 'ifa' to 'address'.
Revision 1.68 / (download) - annotate - [select for diffs], Tue May 26 23:42:11 2020 UTC (4 years ago) by krw
Branch: MAIN
Changes since 1.67: +3 -2 lines
Diff to previous 1.67 (colored)
Wrap some overly long lines.
Revision 1.67 / (download) - annotate - [select for diffs], Wed May 20 23:54:53 2020 UTC (4 years ago) by krw
Branch: MAIN
Changes since 1.66: +1 -3 lines
Diff to previous 1.66 (colored)
Remove no longer necessary RTLEN.
Revision 1.66 / (download) - annotate - [select for diffs], Wed May 20 19:13:34 2020 UTC (4 years ago) by krw
Branch: MAIN
Changes since 1.65: +4 -4 lines
Diff to previous 1.65 (colored)
Rename proposal{} fields rtstatic_len, rtsearch_len and rtdns_len to routes_len, domains_len, ns_len. Removes obsolete alignment with names of RTM_PROPOSAL fields and makes code easier to read. No intentional functional change.
Revision 1.65 / (download) - annotate - [select for diffs], Wed May 20 18:27:16 2020 UTC (4 years ago) by krw
Branch: MAIN
Changes since 1.64: +2 -5 lines
Diff to previous 1.64 (colored)
Replace fixed 128-byte fields for search domains, static routes and domain name servers with variable sized uint8_t chunks. Allows larger lists of search domains and static routes while making common situations use much less memory. Original report of breaching the 128-byte limit for static routes from James Cook via misc@. Testing of various versions by Andreas Kusalananda.
Revision 1.64 / (download) - annotate - [select for diffs], Tue May 19 17:59:47 2020 UTC (4 years ago) by krw
Branch: MAIN
Changes since 1.63: +4 -16 lines
Diff to previous 1.63 (colored)
Eliminate imsg_propose{}, imsg_revoke{} and imsg_tell_unwind{} as unnecessary wrappers, since they all contained a single field that could be used as is. Suggested by claudio@
Revision 1.63 / (download) - annotate - [select for diffs], Fri May 8 19:00:19 2020 UTC (4 years, 1 month ago) by krw
Branch: MAIN
Changes since 1.62: +1 -2 lines
Diff to previous 1.62 (colored)
Nuke unneeded 'inits' field in struct proposal. 'mtu' being 0 is enough of a clue to avoid setting interface mtu.
Revision 1.62 / (download) - annotate - [select for diffs], Fri May 8 18:47:02 2020 UTC (4 years, 1 month ago) by krw
Branch: MAIN
Changes since 1.61: +1 -2 lines
Diff to previous 1.61 (colored)
Nuke 'set but never used' addrs field in struct proposal.
Revision 1.61 / (download) - annotate - [select for diffs], Fri Nov 22 22:45:52 2019 UTC (4 years, 6 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE,
OPENBSD_6_7
Changes since 1.60: +1 -2 lines
Diff to previous 1.60 (colored)
Polish logic talking to unwind. ok florian@
Revision 1.60 / (download) - annotate - [select for diffs], Tue Nov 19 14:35:08 2019 UTC (4 years, 6 months ago) by krw
Branch: MAIN
Changes since 1.59: +15 -2 lines
Diff to previous 1.59 (colored)
Inform unwind about DNS servers it finds in leases. ok florian@
Revision 1.59 / (download) - annotate - [select for diffs], Tue Feb 12 16:50:44 2019 UTC (5 years, 3 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE,
OPENBSD_6_6,
OPENBSD_6_5_BASE,
OPENBSD_6_5
Changes since 1.58: +24 -35 lines
Diff to previous 1.58 (colored)
Restructure code to simplifiy imsg communications, further separating DHCP knowledge and interface manipulation. Unprivileged process now sends proposal derived from the accepted lease to the privileged process rather than individual interface manipulation requests. The only intended functional change is that /etc/resolv.conf.tail is not re-read each time a new proposal is implemented, rather than once at dhclient startup.
Revision 1.58 / (download) - annotate - [select for diffs], Sat Jan 19 21:07:13 2019 UTC (5 years, 4 months ago) by krw
Branch: MAIN
Changes since 1.57: +1 -2 lines
Diff to previous 1.57 (colored)
Since dhclient no longer tries to clean up when exiting, there is no need to start a new copy when LLADDR or SSID changes. Just go back to S_PREBOOT and get a new lease. Fewer log messages, faster join'ing new networks, simpler code.
Revision 1.57 / (download) - annotate - [select for diffs], Sat Jan 19 02:55:10 2019 UTC (5 years, 4 months ago) by krw
Branch: MAIN
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)
IMSG_HUP -> IMSG_RESTART. sendhup() -> sendrestart.
Revision 1.56 / (download) - annotate - [select for diffs], Thu Aug 31 17:01:48 2017 UTC (6 years, 9 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE,
OPENBSD_6_4,
OPENBSD_6_3_BASE,
OPENBSD_6_3,
OPENBSD_6_2_BASE,
OPENBSD_6_2
Changes since 1.55: +7 -2 lines
Diff to previous 1.55 (colored)
Don't delete v4 routes that are going to be added back. ok mpi@
Revision 1.55 / (download) - annotate - [select for diffs], Sun Aug 13 17:57:32 2017 UTC (6 years, 9 months ago) by krw
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)
Simplify HUP handling now that proper error checks are done on the imsg socket to detect closure, etc. Die immediately if the priv process notices the interface name can't be turned into an index.
Revision 1.54 / (download) - annotate - [select for diffs], Sat Aug 12 16:57:38 2017 UTC (6 years, 9 months ago) by krw
Branch: MAIN
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored)
Stop trying to outfox the routing table by labelling dhclient routes. Just use the route(8) logic when flushing routes. ok benno@ claudio@
Revision 1.53 / (download) - annotate - [select for diffs], Thu Aug 10 17:15:05 2017 UTC (6 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.52: +3 -4 lines
Diff to previous 1.52 (colored)
Add IMSG_SET_RESOLV_CONF and keep the cached contents in the priv process, so that they do not have to be continually retransmitted. IMSG_WRITE_RESOLV_CONF now just triggers a write of the cached info. Simplifies a bunch of logic.
Revision 1.52 / (download) - annotate - [select for diffs], Tue Aug 8 17:54:24 2017 UTC (6 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.51: +2 -2 lines
Diff to previous 1.51 (colored)
Rename resolv_conf_priority() to default_route_index() to reflect what it does.
Revision 1.51 / (download) - annotate - [select for diffs], Sat Aug 5 12:35:17 2017 UTC (6 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.50: +2 -4 lines
Diff to previous 1.50 (colored)
Bring route creation into line with what route(8) does. In particular stop providing RFA_IFA, and instead supply the relevant interface index in the RTM_ADD message. Various code simplifications as a result.
Revision 1.50 / (download) - annotate - [select for diffs], Sun Jul 30 15:26:46 2017 UTC (6 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.49: +3 -3 lines
Diff to previous 1.49 (colored)
Use effective_proposal data to build resolv.conf contents. Fix a missing != NULL, and add a comment on why no search path and no dns servers means resolv.conf.tail is ignored.
Revision 1.49 / (download) - annotate - [select for diffs], Thu Jul 27 12:45:06 2017 UTC (6 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.48: +1 -4 lines
Diff to previous 1.48 (colored)
Fold add_direct_route(), add_default_route() and add_classless_static_routes() into set_routes(). One less layer of abstraction and all five add_route() invocations now in one place. Clearly comment the route(8) command equivalents for each add_route() invocation.
Revision 1.48 / (download) - annotate - [select for diffs], Mon Jul 24 17:15:41 2017 UTC (6 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)
Shuffle some declarations and functions into the only files they are used in. Tweak a bunch of whitespace.
Revision 1.47 / (download) - annotate - [select for diffs], Sun Jul 23 13:44:53 2017 UTC (6 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.46: +1 -2 lines
Diff to previous 1.46 (colored)
Cease pretending to support option 33 (classFULL static routes). They are dead to the internet. And the current code actually creates /32 routes since kernel magic for classfull routes died a while ago. ok phessler@ claudio@ reyk@ sthen@
Revision 1.46 / (download) - annotate - [select for diffs], Sat Jul 22 14:56:27 2017 UTC (6 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.45: +4 -4 lines
Diff to previous 1.45 (colored)
Rename *_add_address to *_set_address to reflect that the lease address replaces all current addresses. Shuffle some code from bind_lease() into set_mtu()/set_address() to shrink bind_lease().
Revision 1.45 / (download) - annotate - [select for diffs], Fri Jul 21 18:57:55 2017 UTC (6 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.44: +4 -4 lines
Diff to previous 1.44 (colored)
s/set_interface_mtu/set_mtu/g
Revision 1.44 / (download) - annotate - [select for diffs], Mon Jul 10 14:11:47 2017 UTC (6 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)
Use ioctlfd/routefd sockets rather than rolling one's own for resolving 'egress' and adding a route. Move creation of main()'s ioctlfd up so it can be used for the 'egress' resolution.
Revision 1.43 / (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.42: +3 -3 lines
Diff to previous 1.42 (colored)
Always use uintNN_t instead of sometimes u_intNN_t and sometimes uintNN_t.
Revision 1.42 / (download) - annotate - [select for diffs], Fri Jul 7 15:39:30 2017 UTC (6 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored)
dispatch_imsg() only needs to know name and rdomain. No more struct interface_info knowledge in privsep.[ch]
Revision 1.41 / (download) - annotate - [select for diffs], Sat Jul 1 23:27:56 2017 UTC (6 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.40: +7 -7 lines
Diff to previous 1.40 (colored)
Eliminate multiple socket openings/closings and pass fd'd from main loops as required. One socket to do ioctl's per process (called ioctlfd) and one socket to do route messages per socket (called routefd). Clean up local variable declaration lists in passing.
Revision 1.40 / (download) - annotate - [select for diffs], Wed Jun 28 16:31:52 2017 UTC (6 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.39: +9 -11 lines
Diff to previous 1.39 (colored)
Only pass required fields of interface_info to priv_* functions and friends. i.e. ifi->name, ifi->rdomain, or both.
Revision 1.39 / (download) - annotate - [select for diffs], Wed Jun 28 14:35:43 2017 UTC (6 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.38: +2 -8 lines
Diff to previous 1.38 (colored)
Stop trying to clean up addresses, routes and "-L" file whenever dhclient dies. Eliminates differences in handling and thus need to intercept signals INT, TERM, USR1, USR2. Eliminates need for 'zapzombies' field and thus entire struct imsg_flushroutes. Eliminates need for 'imsg' parameter to and associated logic in priv_flush_routes(). Address, routes and '-L' file are still cleaned out when binding a lease.
Revision 1.38 / (download) - annotate - [select for diffs], Sat Jun 24 23:32:57 2017 UTC (6 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.37: +2 -6 lines
Diff to previous 1.37 (colored)
Tweak handling of HUP and new LLADDR. Just use expose and use sighup() function. Don't exit dispatch() loop on SIGHUP, wait for privileged child to execvp() dhclient. Eliminate struct imsg_hup since its contents were not being used except in priv_cleanup(). And 'active_addr' works just as well there. Cleaner and eliminates some extraneous log entries.
Revision 1.37 / (download) - annotate - [select for diffs], Sat Jun 24 10:09:26 2017 UTC (6 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)
Use a local variable rather than a global flag to record the reception of a IMSG_HUP message and trigger the desired restart. Nuke the now pointless IFI_HUP.
Revision 1.36 / (download) - annotate - [select for diffs], Fri Jun 23 15:40:56 2017 UTC (6 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)
Take reyk's imsg resolv.conf improvements of a while ago to their logical conclusion. Nuke _PATH_RESOLV_CONF since the value is only meant to be known inside priv_write_resolv_conf(). Just use a local const char *. Bring priv_write_resolv_conf() into line with other priv_ functions invoked from the dispatch loop. i.e. don't pass it the imsg, just pass a pointer to the data and a size after ensuring there is data to pass.
Revision 1.35 / (download) - annotate - [select for diffs], Tue Apr 11 13:59:27 2017 UTC (7 years, 1 month ago) by krw
Branch: MAIN
Changes since 1.34: +17 -6 lines
Diff to previous 1.34 (colored)
Shuffle route/interface changing functions together into kroute.c. Try to group related functions in kroute.c together and comment them a bit. No intentional functional change.
Revision 1.34 / (download) - annotate - [select for diffs], Mon Apr 10 21:47:44 2017 UTC (7 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.33: +1 -3 lines
Diff to previous 1.33 (colored)
Rework -L logic to use the idiom used in handling the leases file. i.e. open FILE during program set up and use the FILE created for the rest of the program lifetime after dropping privilege and pledge()'ing. No need for passing messages to the priv process. Tweak lease file handling a bit in passing. Monitoring the -L file with external programs like sysutils/entr still works. Looks good to sthen@.
Revision 1.33 / (download) - annotate - [select for diffs], Wed Mar 8 20:11:00 2017 UTC (7 years, 3 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE,
OPENBSD_6_1
Changes since 1.32: +11 -11 lines
Diff to previous 1.32 (colored)
Shuffle, shuffle, shuffle.
Revision 1.32 / (download) - annotate - [select for diffs], Fri Sep 2 15:44:26 2016 UTC (7 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)
Kill 'ifi' global. ok henning@, krw@
Revision 1.31 / (download) - annotate - [select for diffs], Tue Aug 23 09:26:02 2016 UTC (7 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.30: +10 -8 lines
Diff to previous 1.30 (colored)
Make the 'ifi' global local to dhclient.c and pass it as an argument to functions needing it. This is the first step to support multiple interfaces in one dhclient(8) instance. ok krw@
Revision 1.30 / (download) - annotate - [select for diffs], Wed Jul 20 19:40:04 2016 UTC (7 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE,
OPENBSD_6_0
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)
Shrink priv_write_file() API so that it does less, and the callers ask it to do less. Discussion with guenther. ok krw
Revision 1.29 / (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_5_9_BASE,
OPENBSD_5_9
Changes since 1.28: +1 -5 lines
Diff to previous 1.28 (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.28 / (download) - annotate - [select for diffs], Tue Feb 10 04:20:26 2015 UTC (9 years, 4 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE,
OPENBSD_5_8,
OPENBSD_5_7_BASE,
OPENBSD_5_7
Changes since 1.27: +2 -1 lines
Diff to previous 1.27 (colored)
Groundwork for better route support over multiple interfaces by using RTM_IFA to bind routes to an interface. Keep the subnet route conflict avoidance code for the time being. diff from claudio@ as part of larger routing magic diff. ok claudio@ mpi@
Revision 1.27 / (download) - annotate - [select for diffs], Sat Feb 7 10:08:06 2015 UTC (9 years, 4 months ago) by krw
Branch: MAIN
Changes since 1.26: +7 -1 lines
Diff to previous 1.26 (colored)
Add support for interface-mtu (option 26). Original request+diff from matthew@ ok dlg@
Revision 1.26 / (download) - annotate - [select for diffs], Fri Feb 6 09:16:06 2015 UTC (9 years, 4 months ago) by reyk
Branch: MAIN
Changes since 1.25: +6 -12 lines
Diff to previous 1.25 (colored)
The write_file() privsep interface was too permissive and theoretically allowed the unprivileged child process to write to arbitrary files. Restrict it by replacing it with two specific write_resolv_conf() and write_option_db() privsep interfaces where all the critical decision has been moved to the parent. OK krw@
Revision 1.25 / (download) - annotate - [select for diffs], Fri Feb 6 06:47:29 2015 UTC (9 years, 4 months ago) by krw
Branch: MAIN
Changes since 1.24: +1 -11 lines
Diff to previous 1.24 (colored)
matthew@ points out that it's a bad idea to rely on the non-privileged, network-facing process to properly fill out the interface name and rdomain on which operations are to be performed. Instead, always use the interface name and rdomain discovered before forking and dropping privs. Lets all the imsg structs to drop a couple of members. ok matthew@ henning@
Revision 1.24 / (download) - annotate - [select for diffs], Fri Jan 16 06:39:56 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)
Replace <sys/param.h> with <limits.h> and other less dirty headers where possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
Revision 1.23 / (download) - annotate - [select for diffs], Tue Dec 10 17:02:35 2013 UTC (10 years, 6 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE,
OPENBSD_5_6,
OPENBSD_5_5_BASE,
OPENBSD_5_5
Changes since 1.22: +1 -2 lines
Diff to previous 1.22 (colored)
Oops. Missed file. Rework [priv_]write_file() and associated struct imsg_write_file to use imsg_composev() rather than allocating memory, copying data into it, and then passing it to imsg_compose() to copy data again into imsg buffer. ok pelikan@
Revision 1.22 / (download) - annotate - [select for diffs], Sun Jun 9 22:39:51 2013 UTC (11 years ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE,
OPENBSD_5_4
Changes since 1.21: +2 -1 lines
Diff to previous 1.21 (colored)
Make route adding interface more flexible by passing flags to be used rather than deducing them. Use priv_add_route() to add the 127.0.0.1 address when adding an address.
Revision 1.21 / (download) - annotate - [select for diffs], Sun Jun 9 15:06:34 2013 UTC (11 years ago) by krw
Branch: MAIN
Changes since 1.20: +8 -6 lines
Diff to previous 1.20 (colored)
Re-apply route adding code refactoring -- it wasn't the problem that broke populating the egress group.
Revision 1.20 / (download) - annotate - [select for diffs], Sun Jun 9 00:30:06 2013 UTC (11 years ago) by krw
Branch: MAIN
Changes since 1.19: +6 -8 lines
Diff to previous 1.19 (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.19 / (download) - annotate - [select for diffs], Sat Jun 1 16:26:07 2013 UTC (11 years ago) by krw
Branch: MAIN
Changes since 1.18: +8 -6 lines
Diff to previous 1.18 (colored)
Refactor the default route adding code to use a general route adding function that will be reused for future work. ok claudio@
Revision 1.18 / (download) - annotate - [select for diffs], Sat Mar 30 16:10:01 2013 UTC (11 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)
Since deleting all the addresses on an interface removes all the relevant entries from the arp cache, don't bother asking for/processing arp entries in the route dumps. Thus allowing use of NET_RT_FLAGS with RTF_GATEWAY and AF_INET, to ask for only the routes dhclient wants to expunge rather than all routes in existance. Greatly shrinks and simplifies the code. No intentional functional change. Tested by sthen@.
Revision 1.17 / (download) - annotate - [select for diffs], Mon Mar 11 16:01:01 2013 UTC (11 years, 3 months ago) by krw
Branch: MAIN
Changes since 1.16: +2 -1 lines
Diff to previous 1.16 (colored)
When binding a lease, check for and clear out any 'zombie' routes left behind by dead dhclients. i.e. dhclients that no longer respond to 'kill(pid, 0)'. As a result, no need to handle the 127.0.0.1 route separately when deleting an interface. Appears to fix in passing a problem with routes vs link addresses that sthen@ was seeing. ok sthen@
Revision 1.16 / (download) - annotate - [select for diffs], Wed Feb 20 18:50:29 2013 UTC (11 years, 3 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE,
OPENBSD_5_3
Changes since 1.15: +1 -7 lines
Diff to previous 1.15 (colored)
Nuke unused imsg_resolv_conf struct and declaration for non-existant function priv_resolv_conf().
Revision 1.15 / (download) - annotate - [select for diffs], Mon Feb 18 15:57:08 2013 UTC (11 years, 3 months ago) by krw
Branch: MAIN
Changes since 1.14: +4 -4 lines
Diff to previous 1.14 (colored)
Rework log messages to be more useful. Rename IMGS_CLEANUP/imsg_cleanup/cleanup to IMSG_HUP/imsg_hup/sendhup to more accurately reflect intent of causing the privileged process to initiate restart. There should now be one and only one message logged at termination or restart, logged by the process initiating the termination or restart. As part of fixing this, remove duplicate cleanup attempts and exit after sending IMSG_HUP. These make logged messages more consistant and fix issues with incorrect cleanups. More prodding from deraadt@
Revision 1.14 / (download) - annotate - [select for diffs], Sat Feb 2 04:18:30 2013 UTC (11 years, 4 months ago) by krw
Branch: MAIN
Changes since 1.13: +2 -1 lines
Diff to previous 1.13 (colored)
Fix resolv.conf magic. Add identifying comment to generated resolv.conf so it is easy to see which interface generated it.
Revision 1.13 / (download) - annotate - [select for diffs], Sun Jan 27 02:45:46 2013 UTC (11 years, 4 months ago) by krw
Branch: MAIN
Changes since 1.12: +3 -5 lines
Diff to previous 1.12 (colored)
Refactor code a bit. Calculate resolv.conf contents once when binding a lease and reuse as required whenever resolv.conf is written. Use write_file() rather than a custom message/functions to write out resolv.conf.
Revision 1.12 / (download) - annotate - [select for diffs], Thu Jan 17 23:41:07 2013 UTC (11 years, 4 months ago) by krw
Branch: MAIN
Changes since 1.11: +2 -1 lines
Diff to previous 1.11 (colored)
Try harder to clear out default routes on the interface being configured. Only exempt default routes labelled as being the property of another dhclient.
Revision 1.11 / (download) - annotate - [select for diffs], Tue Jan 15 21:44:28 2013 UTC (11 years, 4 months ago) by krw
Branch: MAIN
Changes since 1.10: +14 -2 lines
Diff to previous 1.10 (colored)
Add IMSG_WRITE_FILE and associated bits to allow the unprivileged process to ask that a file be written by the privileged process. Not yet used.
Revision 1.10 / (download) - annotate - [select for diffs], Sun Dec 2 17:03:19 2012 UTC (11 years, 6 months ago) by krw
Branch: MAIN
Changes since 1.9: +10 -2 lines
Diff to previous 1.9 (colored)
Try harder to cleanup when exiting. In particular catch signals SIGHUP, SIGINT, SIGTERM, SIGUSR1, SIGUS2 and cleanup before exiting when getting them. Cleanup meaning removing routes and the interface address added. Tweaks and feedback from phessler@, sthen@, otto@, deraadt@
Revision 1.9 / (download) - annotate - [select for diffs], Sat Dec 1 00:13:32 2012 UTC (11 years, 6 months ago) by krw
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)
A couple of whitespace nits.
Revision 1.8 / (download) - annotate - [select for diffs], Thu Nov 29 00:31:57 2012 UTC (11 years, 6 months ago) by krw
Branch: MAIN
Changes since 1.7: +1 -3 lines
Diff to previous 1.7 (colored)
Nuke unused 'extern' declaration.
Revision 1.7 / (download) - annotate - [select for diffs], Fri Nov 23 15:25:47 2012 UTC (11 years, 6 months ago) by krw
Branch: MAIN
Changes since 1.6: +38 -16 lines
Diff to previous 1.6 (colored)
Use the libutil imsg framework rather than a hand-rolled local version. This is the last hand-rolled imsg implementation I could spot. Doesn't seem to break sparc64. Suggested by chris@, tweaks from brad@ and reyk@. ok reyk@
Revision 1.6 / (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.5: +6 -5 lines
Diff to previous 1.5 (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.5 / (download) - annotate - [select for diffs], Tue Feb 13 21:54:22 2007 UTC (17 years, 3 months ago) by stevesk
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE,
OPENBSD_5_2,
OPENBSD_5_1_BASE,
OPENBSD_5_1,
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.4: +1 -4 lines
Diff to previous 1.4 (colored)
move includes only needed in dhclient.c; ok henning@
Revision 1.4 / (download) - annotate - [select for diffs], Sun Aug 7 01:35:11 2005 UTC (18 years, 10 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE,
OPENBSD_4_0,
OPENBSD_3_9_BASE,
OPENBSD_3_9,
OPENBSD_3_8_BASE,
OPENBSD_3_8
Changes since 1.3: +4 -4 lines
Diff to previous 1.3 (colored)
Simplify code by calling error() from inside buf_* functions rather than always testing the return code and calling error() from the caller. From a diff by moritz@, ok henning@.
Revision 1.3 / (download) - annotate - [select for diffs], Fri Aug 5 16:23:30 2005 UTC (18 years, 10 months ago) by moritz
Branch: MAIN
Changes since 1.2: +3 -2 lines
Diff to previous 1.2 (colored)
remove duplicate privsep prototypes and put all of them into privsep.h. ok krw@ henning@
Revision 1.2 / (download) - annotate - [select for diffs], Tue May 4 18:51:18 2004 UTC (20 years, 1 month ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE,
OPENBSD_3_7,
OPENBSD_3_6_BASE,
OPENBSD_3_6
Changes since 1.1: +2 -0 lines
Diff to previous 1.1 (colored)
$OpenBSD$
Revision 1.1 / (download) - annotate - [select for diffs], Tue May 4 12:52:05 2004 UTC (20 years, 1 month ago) by henning
Branch: MAIN
privilege seperate dhclient. the privileged child's duty is the dhclient-script env setup & exection. the parent process now chroots to /var/empty and drops privileges to _dhcp mostly hacked at vancouver airport with some feedback from krw@ and otto@, tested to not break installs by krw@