drochner
8fd6dadaf8
include <netipsec/ipsec.h> rather than <netinet6/ipsec.h> from userland
...
where possible, for consistency and compatibility to FreeBSD
(exception: KAME specific statistics gathering in netstat(1) and systat(1))
2012-01-04 16:09:40 +00:00
mbalmer
24e4901256
There is no doubt whether whether should have a 'h' after the 'w'.
2011-10-17 16:35:21 +00:00
christos
5b4a37ed53
check the result of malloc (Maksymilian Arciemowicz)
2011-09-22 12:38:33 +00:00
christos
b3d08e40dc
Instead of printing the raw suspect value instead of the name (!?!?), print the
...
name and the suspect value vis encoded.
2011-08-17 08:06:38 +00:00
christos
e2f91adb83
gcc-4.5 fixes
2011-08-16 16:36:38 +00:00
christos
4dff6c909f
Fix CVS-2011-2748, malformed packets can cause server to crash causing a DoS.
2011-08-15 21:12:43 +00:00
mrg
66f169a030
don't write "(u_char) NULL".
2011-06-22 03:57:20 +00:00
christos
3b8a1d51ed
CVE-2011-0997 dhclient: insufficient sanitization of certain DHCP
...
response values. Apply patch by hand from the 3.1-ESV-R1 release.
2011-04-06 20:24:16 +00:00
snj
c4acb3fa95
Fix a thinko: the DHCP _client_ is doing the requesting.
...
Reported by Anonymous in PR misc/39162.
2010-02-17 01:17:36 +00:00
drochner
ae6fdb5ce4
rather than adding braces in the code, define the offending macro
...
to "(void)0". This is what similar code in bind9 (up to 9.5) does.
(native NetBSD code usually does "do { } while (/* CONSTCOND */ 0)"
in this case)
Anyway, I've checked the code, didn't find ambiguities due to
the empty statements, so the whole thing is harmless.
2010-01-26 19:11:00 +00:00
drochner
7393fe922a
fix some cases where the EREPORT macro defined to null (as in the NetBSD
...
build) could change the behaviour of the code in unexpected ways
2010-01-25 20:33:57 +00:00
wiz
bfc69b9f22
Add missing parentheses in ifdef(OLD_LEXER). Found by cppcheck.
2010-01-17 22:42:36 +00:00
joerg
2d19820108
Kill bad tab in markup.
2009-10-15 02:18:22 +00:00
tonnerre
7c437b76bb
Fix behavior of dhcpd in the case where clientid and hardware ethernet
...
definitions are mixed. Fixes a refcount assertion.
2009-07-16 22:44:27 +00:00
christos
96a538bff1
Limit the length of the address mask before we copy it.
2009-06-23 19:50:50 +00:00
mellon
3265aaf1d6
Get rid of a spurious dereference in DHCPRELEASE.
2008-02-26 05:03:29 +00:00
gdt
e6599a52d6
Change buffer for SIOCGIFCONF usage from 2048 to 32768. Because the
...
code to retry on SIOCGIFCONF not returning all interfaces is broken,
this unreasonably large buffer should handle the case of a machine
with lots of (usually virtual) interfaces. dhcpd 4 uses a different
method to get interface configuration, so this kludge should go away
on upgrade.
Fix based on understanding of the code, but has been compile-tested
only, to address failure report received from Michael Graff.
2007-10-31 15:26:51 +00:00
gdt
f77e123027
Follow NetBSD's interpretation of the interface to SIOCGIFCONF: the
...
next ifreq is sizeof(struct ifreq) after the current one unless the
sockaddr is bigger than the union in ifreq that holds it.
In the original 4.4BSD code, this interpretation results in the same
behavior as the "is the sockaddr bigger than struct sockaddr", because
sizeof(struct sockaddr) and sizeof(ifc->ifr_ifru) are the same.
Add comments pointing out problems in the 'need bigger buffer' code,
and copying excessive amounts of data.
2007-09-13 11:56:41 +00:00
christos
f84135414c
don't make bogus assumptions about struct alignment.
2007-05-31 02:58:10 +00:00
tls
ac016a7fc2
Changes required for FORTIFY_SOURCE: don't rely on #define read (etc.)
...
before system header file inclusion magically causing what "read" is
#defined to to pick up a read-like prototype. For sanity's sake, put
prototypes for revolting trace_mr stuff in their own header file (instead
of nowhere at all and using the trick referenced above).
2007-05-27 16:27:57 +00:00
dogcow
53d226486b
An incredibly grody hack to save a few more precious bytes: in dhclient,
...
don't include the unknown-{nn,mm} strings ifdef SMALL.
2007-03-01 01:02:33 +00:00
alc
b68a85a32f
CID-4282: dies if we can't allocate memory for `peer->hba'
...
CID-2488: `t' is uninitialized
2006-12-26 00:08:44 +00:00
martin
be008341cd
Hopping through a void* is not enough to get rid of alignment requirements.
...
Do a memcpy to a properly aligned local variable instead.
2006-11-23 13:07:17 +00:00
tron
66ac2330dc
Teach dhclient(8) to exit gracefully if another instance is already
...
running instead of overwriten the PID file, removing IPv4 address
from the network interface(s) and leaving the system in a broken state.
This fixes PR bin/26504 by Jun-ichiro itojun Hagino. Patch supplied
by Rivo Nurges during NetBSD's second Bugathon.
2006-10-07 14:14:06 +00:00
christos
40a354528b
Coverity CID 3692: Prevent use after free (from Arnaud Lacombe)
2006-10-03 19:06:05 +00:00
seb
4a00cfc811
Typo.
2006-08-28 21:21:52 +00:00
christos
a6fd778155
don't zerodivide when "backoff-cutoff 0;" tested by zafer
2006-08-03 20:17:43 +00:00
chap
baa41845e1
Remove statement (incorrect as of ISC release 3.0.3) that the next-server
...
value defaults to the server address. (This statement has been removed in
ISC release 3.0.4.)
Closes PR bin/33565.
2006-05-26 19:22:03 +00:00
mrg
d1e102b605
match u_char * with u_char[].
2006-05-11 09:29:39 +00:00
mrg
0eaf0f8b7c
#include <sys/param.h> since we want to check __NetBSD_Version__.
2006-05-11 00:08:44 +00:00
christos
8de5cf0e33
Coverity CID 2639: Fix obvious bug in loop handling. Using and freeing the
...
wrong pointer.
2006-04-02 01:10:39 +00:00
christos
995a3df3f0
PR/33174: Wolfgang Stukenbrock: dhcpd fails to deliver hostnames for dynamic
...
ranges because it is using the wrong universe in the host lookup.
2006-03-31 17:28:50 +00:00
drochner
9fbefaf7c9
merge dhcp-3.0.3
2005-08-11 17:13:21 +00:00
drochner
1b6f9e91ef
import ISC dhcp-3.0.3 onto the vendor branch
2005-08-11 16:54:17 +00:00
mellon
3323a8aa52
Add a -o flag that causes the client to exit once it's bound a lease.
2005-07-01 01:19:02 +00:00
jmc
7a0ba84f10
gcc 2.96 requires all declarations before variable usage so the last set of
...
changes to fix -Wunitialized broke on vax. Moved definitions of
option and op before the initializations.
2005-06-16 22:04:24 +00:00
he
ab70040846
Add initialization of local variable to appease -Wuninitialized.
...
Marked with XXXGCC for arm and sparc64 compilers (found while
building for those).
Reviewed by lukem.
2005-06-10 23:48:24 +00:00
chs
7bbdd188e1
appease gcc -Wuninitialized on hp700.
2005-06-05 19:08:28 +00:00
lukem
7f4d732106
appease gcc -Wuninitialized
2005-06-02 11:10:00 +00:00
lukem
51d9d5224b
omapi_io_destroy(): ensure last is initialized before use, similar to the
...
method used in omapi_unregister_io_object().
Detected with gcc -Wuninitialized
2005-06-02 11:09:02 +00:00
lukem
f1ce52a40f
Don't attempt to close a random file descriptor.
...
Detected with gcc -Wuninitialized.
2005-06-02 05:45:59 +00:00
lukem
8fe660271c
Ensure name_str is initialized because we try to free it later.
...
Detected with gcc -Wuninitialized.
2005-06-02 05:33:01 +00:00
lukem
edd6967461
Sanity checking. Detected with gcc -Wuninitialized
2005-06-02 05:30:12 +00:00
christos
9ab78e153b
use /dev/bpf
2004-12-01 23:45:12 +00:00
christos
aad48c44a7
One bpf is enough.
2004-12-01 23:23:39 +00:00
christos
be07a6cfdb
One bpf is enough
2004-12-01 23:22:42 +00:00
dsl
cfe7f80ff0
Add (unsigned char) cast to ctype functions
2004-10-29 20:51:11 +00:00
perry
808ab1197e
Use packet length from IP header instead of packet length from BPF
...
header.
Patches given to me by Ted Lemon.
This avoids using potentially garbage data returned if the ethernet
driver returns a packet that's too long.
2004-10-22 05:22:39 +00:00
mellon
ed5b9801d3
Don't log overly-long (>32 byte) client hostnames.
2004-06-11 19:54:02 +00:00
itojun
937e8b0fbe
add O_TRUNC to open(2). revision 1.11 used fopen(foo, "w") which implies
...
truncation of opened file. it should suppress bogus "corrupted lease file"
warning and broken dhclient.leases staying around.
2004-05-06 09:07:54 +00:00