Commit Graph

169 Commits

Author SHA1 Message Date
Martin Blapp
b5c1da06a9 Make 'client DNS forward update' working again which got broken in rev.
RC9 of dhclient 3.0.1. This fix will be part of dhclient 3.0.2. It is
also part of the official redhat package.

Submitted by:	Jason Vas Dias <jvdias@redhat.com>
Discussed on:	dhcp-hackers@isc.org
2004-08-16 22:35:56 +00:00
Martin Blapp
ff20f7a95e Document local changes r1.41 and r1.42 of dhclient.c 2004-08-16 21:31:34 +00:00
Martin Blapp
93fb40624f Recommit removed Rev. 1.40. This fix does solve a FPE with negative lease
time as described in the PR below.

It seems that this patch should have been part of the vendor tree but got
accidently missed in the 3.0.1 final version. It will definitly be
part of 3.0.2 but until then it's a long way to go.

Submitted by:   ISC (Vendor)
PR:             bin/54517
2004-08-16 21:26:04 +00:00
Martin Blapp
222bb5ab84 It could happen that the renew/rebind times in the leasefile were
expired but the expire time itself was still valid and in the future.
If this happened we ended up using the state S_RENEW with an
INADDR_BROADCAST address set in the request and dhclient never got
any answer back. The only workaround was to delete the lease file.

Fix this case with a check for the S_RENEW and a fallback to the
S_INIT state.

PR:		bin/69361
Submitted by:	Andrew Gallatin <gallatin@cs.duke.edu>
2004-08-16 16:09:50 +00:00
Martin Blapp
e6fb0bd676 Sync a reverted part of dhclient.c with the vendor source. It seems
that a buxfix from rc14 got backed out again. We do the same.
2004-08-16 15:48:02 +00:00
Martin Blapp
c9dca5ca78 Resolve conflicts from dhclient 3.0.1 final import.
No functional changes in this import.
2004-08-15 23:37:10 +00:00
Martin Blapp
f511f66676 This commit was generated by cvs2svn to compensate for changes in r133783,
which included commits to RCS files with non-trunk default branches.
2004-08-15 23:33:13 +00:00
Martin Blapp
41893d8997 Import ISC DHCP 3.0.1 client. 2004-08-15 23:33:13 +00:00
Dag-Erling Smørgrav
9d617478bd Fix a number of incorrect assumptions regarding the size of time_t.
The code has its own TIME type, which is actually defined to time_t,
but it still used u_int32_t in some places.

In addition, dhclient not only had two separate global cur_time
variables, one of which was defined as u_int32_t and the other as
TIME, but cur_time was sometimes shadowed by local variables, leading
to widespread confusion as to which of these variable was being
referenced.

There is a lesson in here somewhere: a decent compiler with warnings
enabled should have caught all of this long before it became a
problem.

This patch has been submitted to the vendor, but it will likely be
some time before they release a version that includes it.

Approved by:	mbr
2004-07-06 15:15:14 +00:00
Martin Blapp
2b60cbcd6d Document the 64bit time_t fix. 2004-06-26 23:19:40 +00:00
Martin Blapp
31971694b8 Use int32_t to convert the leasetime to fix support for platforms
where time_t is 64-bit.

Submitted by:   des
2004-06-26 23:17:27 +00:00
Martin Blapp
e184bd9576 Our dhclient-script fails to update /etc/resolv.conf if no new
domain name is given and /etc/resolv.conf doesn't exist. Fix this
by using -f (force).

Assigned to ISC as ISC-Bugs #11570

PR:		bin/67613
Submitted by:	Nikos Ntarmos <ntarmos@ceid.upatras.gr>
2004-06-26 10:47:38 +00:00
Martin Blapp
982a2c980e Resolve conflicts. 2004-06-26 10:37:42 +00:00
Martin Blapp
a838a2f0bb Import ISC DHCP 3.0.1 RC14 client. 2004-06-26 10:34:24 +00:00
Martin Blapp
9561f9f36e This commit was generated by cvs2svn to compensate for changes in r131136,
which included commits to RCS files with non-trunk default branches.
2004-06-26 10:34:24 +00:00
Martin Blapp
a74e1146f3 Dhclient dumps core on suspend/resume cycles. If the client isn't active
then we need to go to the reboot state or in state_bound it will core on
the de-reference of client -> active -> options since client -> active = NULL.

While we are here, fix the indentation.

Submitted by:	Doug Ambrisko <ambrisko@ambrisko.com>
2004-01-25 11:30:50 +00:00
Martin Blapp
cf5d2c6934 If we have a working link again after connectivity loss, or if we need
to renew a lease, contact the dhcp-server directly instead of using
INADDR_BROADCAST all the time. This should fix some brain-dead dhcp
server implementations which give you all the time a new IP if the
lease has not yet expired.

Instead of using ICMP to check if the server is alive, we just check
the return value of sendto() and additionally have a timeout there.
2004-01-19 22:07:59 +00:00
Martin Blapp
970533b6a1 Remove files which have been removed in the 3.01RC12 release
of isc-dhcpd.
2004-01-19 15:31:57 +00:00
Martin Blapp
51adeba1aa The previous fix (rev 1.25) is only needed in the second place. 2003-09-15 15:48:12 +00:00
Martin Blapp
2d5e32058b Only kill the default route in the release mode if the interface
where the default route is bound to is the same device. Keep it
working for the single user or sysinstall mode, where we just do
what we did before.

Suggested by:   dougb
2003-09-15 04:47:41 +00:00
Martin Blapp
864ce58afa Restore behaviour from rev. 1.9. Only log when there is a real change
to the configuration state.

Noticed by:	obrien
2003-09-09 16:19:46 +00:00
Martin Blapp
a4b3bf5b8c Import ISC DHCP 3.0.1 RC12 client.
- s/include/includes
- remove already merged files
2003-09-02 11:15:03 +00:00
Martin Blapp
fb26c675fb Resolve conflicts. 2003-09-02 11:13:21 +00:00
Martin Blapp
c262a571d1 Resolve conflicts.
* rev. 1.22
2003-09-02 11:10:29 +00:00
Martin Blapp
09f775bd13 Resolve conflicts:
* rev. 1.33/1.25
2003-09-02 11:09:45 +00:00
Martin Blapp
92633f6fc8 Import ISC DHCP 3.0.1 RC12 client. 2003-09-02 11:01:27 +00:00
Martin Blapp
cc55dd3ffa This commit was generated by cvs2svn to compensate for changes in r119669,
which included commits to RCS files with non-trunk default branches.
2003-09-02 11:01:27 +00:00
Martin Blapp
a26181dca1 Sync with ISC repo. Use SIGTERM instead of SIGKILL, make oldpid a long and
cast it into a pid_t.
2003-09-02 09:09:53 +00:00
Martin Blapp
e32ea5472a Change name of state_link() to state_polling() to make it
more clear what it does.

Trim interface_active() to just do what it should do. Check
if we got link or not and if the NIC supports it. No special
treatment for mediachecks here anymore.

Simplify the code a lot, and remove doublicated parts.

Fix two minor spelling errors.

Add one missing #ifdef ENABLE_POLLING_MODE

Reviewed by:	mdodd
2003-08-10 22:01:37 +00:00
Martin Blapp
0b284f2c7c Fix devices which do not support ifm_status. Always return
TRUE for them.

Reported by:	mdodd
Tested by:	Craig Rodrigues <rodrigc@crodrigues.org>
2003-08-09 20:44:08 +00:00
Martin Blapp
cccd491d52 Add all interface polling patches. 2003-08-07 15:00:55 +00:00
Martin Blapp
44b6b1aaa4 Do not poll during discover. Add a polling tunable to the interface
struct to be able to turn polling on/off.

Tested by:	Larry Rosenman <ler@lerctr.org>
2003-08-07 14:58:46 +00:00
Martin Blapp
ceef306a27 - Fix the polling code to work with media settings in dhclient.conf.
- Rename linkstatus to linkstate which is more correct.

- Sort any leases each time we loose and regain link. With the first
  version we spammed the dhclient.leases file.

- When there was no link on a interface, polling has been done twice.
  This has been fixed with a bigger sleep interval.

- interface_active() now returns only a assumed state of the link.
  If we are using media settings, we cannot be sure that the link
  actually works. That means we assume that the link is working and
  continue to send requests as usual on the interface and loop over
  all possible media options. Polling is still done. If your interface
  gets suddenly link, dhclient will send a dhcp discover request.

After all media settings have been tried a few times, dhclient will
sleep. If one does change networks very often, it can help to set the
"retry timeout" to a low value like 100 seconds. The default is over
six minutes.

Tested by:	Larry Rosenman <ler@lerctr.org>, imp
2003-08-07 07:27:14 +00:00
Martin Blapp
40e0881fab Change ieee802 to ieee80211.
Add bogospaces to match the ISC style.

Suggested by:	eivind
2003-08-06 15:19:52 +00:00
Martin Blapp
565f17391d Fix dhclient infinite loop on ro /etc/resolv.conf
Submitted by:	C J Michaels <cjm2@earthling.net>
Reviewed by:	David W. Hankins
PR:		38778
ISC-Bug:	5754
2003-07-28 22:25:20 +00:00
Martin Blapp
ca27808a34 Don't wait forever if there is no link, go to background
after 2 x polling time.
2003-07-28 13:25:04 +00:00
Martin Blapp
a156f90104 Define $FreeBSD$ at the right place. 2003-07-28 11:49:07 +00:00
Martin Blapp
636a538d15 Enable dhclient to poll the interface state and send only
requests if the interface has an active link. This is a
great benefit if you often change networks with your laptop
and you do not like to kill/restart dhclient all the time.
Changes are automatically detected and the link is refreshed.

The change allows us to start dhclient in background mode
Enable dhclient to poll the interface state and send only
requests if the interface has an active link. This is a
great benefit if you often change networks with your laptop
and you do not like to kill/restart dhclient all the time.
Changes are automatically detected and the link is refreshed.

The change allows us to start dhclient in background mode
while the network cable is not plugged in.

To control the polling interval, the option -i has been
introduced. It takes seconds as parameter, the minimum is
one second, the default is five seconds.

Polling is done in seconds, not microseconds, because dhclient
does internally work with timeouts in seconds.

This change will be part of the next major ISC-dhcpd release.

Tested by:	bms, imp, and many many others.
Reviewed by:	murray, eivind, dhclient folks
2003-07-28 08:30:11 +00:00
Martin Blapp
fa7235b784 Add notice about the local change in r1.25 2003-07-26 21:29:28 +00:00
Gordon Tetlow
6d1b4a4730 Tweak a couple of utilities so they compile cleanly for /rescue. Mostly
path fixes.

Submitted by:	Tim Kientzle <kientzle@acm.org>
2003-06-29 18:46:18 +00:00
David E. O'Brien
8d5c19ffbc Centralize _PATH_* definitions.
Submitted by:	Tim Kientzle <kientzle@acm.org> (embellished by me)
2003-05-05 22:49:23 +00:00
Martin Blapp
b0f74fbd3a We don't have cat(1) and kill(1) on the miniroot disks.
This fix will be committed to the ISC repo later, but for now
take this file out of the vendor tree.

Reviewed by:	phk
Approved by:	murray
2003-03-23 23:29:36 +00:00
David E. O'Brien
ae573770aa Add a -v(erbose) flag to undo our -q(uiet) default. 2003-03-18 19:46:55 +00:00
Murray Stokely
0b39641ad0 We now include the dhcpctl subdirectory. 2003-01-16 19:05:56 +00:00
David E. O'Brien
4bf463ac4d Update for the isc_dhcp_3_0_1_rc11 import. 2003-01-16 07:53:32 +00:00
David E. O'Brien
f68a4f4923 Use the stock version of this file -- all our needs have been taken care of. 2003-01-16 07:41:43 +00:00
David E. O'Brien
ee0e0df35c Make the "SEE ALSO" suitable for FreeBSD. 2003-01-16 07:36:45 +00:00
David E. O'Brien
6e38cc5509 Make isc_dhcp_3_0_1_rc11's "SEE ALSO" suitable for FreeBSD. 2003-01-16 07:31:49 +00:00
Murray Stokely
e00b76de56 Import ISC DHCP 3.0.1 RC11 omshell interface. 2003-01-16 07:29:37 +00:00
Murray Stokely
fc7a955609 This commit was generated by cvs2svn to compensate for changes in r109365,
which included commits to RCS files with non-trunk default branches.
2003-01-16 07:29:37 +00:00