-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathChangeLog
2569 lines (1638 loc) · 74.4 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2022-03-31 17:27 naddy
* usr.sbin/dhcpd/: dhcp-options.5, dhcpd.8, dhcpd.conf.5: man
pages: add missing commas between subordinate and main clauses
jmc@ dislikes a comma before "then" in a conditional, so leave
those untouched.
ok jmc@
2022-01-28 06:33 guenther
* usr.sbin/dhcpd/memory.c: When it's the possessive of 'it', it's
spelled "its", without the apostrophe.
2022-01-16 21:20 naddy
* usr.sbin/dhcpd/parse.c: dhcpd: fix -Wunused-but-set-variable
warning
ok krw@
2022-01-05 11:01 tb
* usr.sbin/dhcpd/sync.c: dhcpd: straightforward conversion to
HMAC_CTX on the heap, similar to what was done in spamd a while
back.
ok florian
2021-12-13 18:28 deraadt
* usr.sbin/dhcpd/log.h: including sys/cdefs.h manually started as a
result of netbsd trying to macro-build a replacement for sccsid,
and was done without any concern for namespace damage.
Unfortunately this practice started infecting other code as
others were unaware they didn't need the file. ok millert
guenther
2021-11-20 11:47 kn
* usr.sbin/dhcpd/dispatch.c: Start on DOWN interfaces
Do not skip interfaces during startup because they're not UP.
dhcpd(8) can start listening on such interfaces just fine (given
suitable IPs on them) and interfaces may come UP later in time.
Otherwise dhcpd would fail to start completely if it didn't find
any interface that would be UP early on and administrators had to
restart dhcpd.
Other daemons and nc(1)'s `-l' listen just fine on DOWN
interfaces as well.
Noticed while switching a bridge(4)/vether(4) setup to
veb(4)/vport(4) and hostname.vport without explicit "up" (vport
does not implicitly pulls itself UP when configuring an address).
OK dlg florian
2021-10-24 21:24 deraadt
* usr.sbin/dhcpd/pfutils.c: For open/openat, if the flags parameter
does not contain O_CREAT, the 3rd (variadic) mode_t parameter is
irrelevant. Many developers in the past have passed mode_t (0,
044, 0644, or such), which might lead future people to copy this
broken idiom, and perhaps even believe this parameter has some
meaning or implication or application. Delete them all. This
comes out of a conversation where tb@ noticed that a strange (but
intentional) pledge behaviour is to always knock-out high-bits
from mode_t on a number of system calls as a safety factor, and
his bewilderment that this appeared to be happening against valid
modes (at least visually), but no sorry, they are all irrelevant
junk. They could all be 0xdeafbeef. ok millert
2021-07-12 15:09 beck
* usr.sbin/dhcpd/pfutils.c: Change the error reporting pattern
throughout the tree when unveil fails to report the path that the
failure occured on. Suggested by deraadt@ after some tech
discussion.
Work done and verified by Ashton Fagg <[email protected]>
ok deraadt@ semarie@ claudio@
2020-11-10 16:42 krw
* usr.sbin/dhcpd/: dhcpd.h, hash.c, memory.c: Remove prototypes for
functions removed 10+ years ago. Return types should be on their
own lines.
Diffs from Martin Vahlensiech via tech@. Thanks!
2020-05-16 16:58 jmc
* usr.sbin/dhcpd/dhcpd.conf.5: list example files in FILES with a
short description: generally, "Example configuration file.", but
occasionally something else fit better; at the same time, try to
make the format for FILES more consistent;
original diff from clematis
2020-04-23 15:00 krw
* usr.sbin/dhcpd/confpars.c: Correctly parse "0/0" as the default
route when specifying the classless-[ms-]static-routes options in
dhcpd.conf.
Brings dhcpd.conf CIDR parsing in line with dhclient.conf,
dhcp-options(5) and the command lines of various utilities.
Inconsistency noted and fix tested by Freda Bundchen. Thanks!
2020-04-17 06:24 dtucker
* usr.sbin/dhcpd/dhcpd.conf.5: Document using /etc/ethers to look
up ethernet addresses. ok krw@, wordsmithing jmc@
2020-04-16 23:23 dtucker
* usr.sbin/dhcpd/parse.c: Support looking up ethernet addresses in
/etc/ethers at dhcpd startup time. If the lookup fails it falls
back to parsing the ethernet address normally. ok krw@
2020-04-06 17:23 benno
* usr.sbin/dhcpd/memory.c: this is errata 6.6/024_dhcpd.patch.sig
Commit to current was:
revision 1.29 date: 2020/04/06 17:05:40; author: krw; state:
Exp; lines: +3 -2; commitid:$ dhcpd could reference freed
memory after releasing a lease with an unusually long uid.
Reported by Adarsh Dinesh. Thanks!
2020-04-06 17:22 benno
* usr.sbin/dhcpd/memory.c: this is errata 6.5/034_dhcpd.patch.sig
Commit to current was:
revision 1.29 date: 2020/04/06 17:05:40; author: krw; state:
Exp; lines: +3 -2; commitid:$ dhcpd could reference freed
memory after releasing a lease with an unusually long uid.
Reported by Adarsh Dinesh. Thanks!
2020-04-06 17:05 krw
* usr.sbin/dhcpd/memory.c: dhcpd could reference freed memory after
releasing a lease with an unusually long uid.
Reported by Adarsh Dinesh. Thanks!
2019-10-03 14:49 claudio
* usr.sbin/dhcpd/icmp.c: Properly initalize the ICMP message to
zero to avoid leaking 4-byte of uninitialised memory in the sent
icmp echorequest. Reported by Adarsh Dinesh (adarsh.dinesh at
gmail com) OK florian@ deraadt@
OpenBSD 6.4 errata 026
2019-10-03 14:48 claudio
* usr.sbin/dhcpd/icmp.c: Properly initalize the ICMP message to
zero to avoid leaking 4-byte of uninitialised memory in the sent
icmp echorequest. Reported by Adarsh Dinesh (adarsh.dinesh at
gmail com) OK florian@ deraadt@
OpenBSD 6.5 errata 014
2019-10-03 13:36 claudio
* usr.sbin/dhcpd/icmp.c: Properly initalize the ICMP message to
zero to avoid leaking 4-byte of uninitialised memory in the sent
icmp echorequest. Reported by Adarsh Dinesh (adarsh.dinesh at
gmail com) OK florian@ deraadt@
2019-08-08 06:59 mestre
* usr.sbin/dhcpd/pfutils.c: One missing piece when I added
pledge(2) to dhcpd(8) was in the code path when it's invoked with
either -A/-C/-L, which at the time I left alone due to some
forbidden ioctls by pledge(2).
Now we have unveil(2) and this path can be further restricted by
using it instead of chroot(2) since this "sandbox" (not sure why
people call sandbox to about everything these days) can be
escaped with *at(2) calls.
Since no filesystem access is needed here then we can disable its
access by calling unveil("/", "") unveil(NULL, NULL).
added /* no filesystem visibility */ as per suggestion by and OK
deraadt@
2019-08-06 11:07 krw
* usr.sbin/dhcpd/dhcpd.c: Use pw->pw_dir when chroot'ing, not
_PATH_VAREMPTY.
Brings various dhcp related daemons into line with the common
idiom.
ok florian@
2019-06-28 13:32 deraadt
* usr.sbin/dhcpd/: pfutils.c, udpsock.c: When system calls indicate
an error they return -1, not some arbitrary value < 0. errno is
only updated in this case. Change all (most?) callers of
syscalls to follow this better, and let's see if this strictness
helps us in the future.
2019-05-10 15:03 visa
* usr.sbin/dhcpd/confpars.c: Fix dhcpd build on gcc architectures.
OK deraadt@ jca@
2019-05-08 22:00 krw
* usr.sbin/dhcpd/: confpars.c, dhcp-options.5, dhcp.h, dhcpd.h,
tables.c: Switch domain-search parsing from hand rolled hex
string to human readable list of strings.
Slightly tweaked version of a diff from William Ahern via tech@.
Long silence on all fronts leads to community based testing.
2019-04-02 03:21 krw
* usr.sbin/dhcpd/dhcp-options.5: Document new domain-search syntax
available to dhclient(8).
2019-04-01 14:45 jmc
* usr.sbin/dhcpd/dhcp-options.5: missing full stop;
2019-04-01 11:21 krw
* usr.sbin/dhcpd/dhcp-options.5: Add a rfc1035 data type and use it
to describe domain-search. Mention that dhcpd(8) still calls this
option-119. Also mention that the information provided by this
option will be used in preference to domain-name when
constructing resolv.conf(5).
Merciless prodding by florian@ and kn@.
2019-04-01 10:25 krw
* usr.sbin/dhcpd/dhcp-options.5: Describe the cidr data type and
rework the classless[-ms]-static-routes verbiage to use cidr and
ip-address types rather than hand waving manual construction.
Add an explicit note that dhclient(8) ignores the obsolete
"static-routes" option.
2019-04-01 09:37 krw
* usr.sbin/dhcpd/dhcp-options.5: int16 and int8 are not used for
any option. So don't mention them.
2019-04-01 08:52 krw
* usr.sbin/dhcpd/dhcp-options.5: Document dhcp-message (a.k.a.
option 56) and tweak verbiage for dhcp-max-message-size (a.k.a.
option 57) in the hope of clarifying things.
2019-04-01 08:37 krw
* usr.sbin/dhcpd/dhcp-options.5: Correct the documentation of
relay-agent-information, nds-context and nds-tree-name to show
that they are parsed as data-string ('X') and not string ('t').
Correct the documentation of dhcp-option-overload to show that it
is parsed as a single uint8, not an array of uint8s.
2019-03-18 00:00 dlg
* usr.sbin/dhcpd/bpf.c: explicitly use BPF_FILDROP_CAPTURE when
configuring BIOCSFILDROP
BIOCSFILDROP used to just be a flag, ie, any non-zero value was
treated the same, but i'm changing it so different values do
different things. this way the programs should keep working even
if i decide to change the values for these macros.
2018-12-07 12:52 henning
* usr.sbin/dhcpd/pfutils.c: I noticed the "pf table handler"
process not going away on dhcpd restart, looked at the error
handling here, and.... oh my. If opening /dev/pf on startup
fails, don't just warn and move on, but bail. If chroot (or the
chdir after) fail, don't just warn and move on, bail. If
dropping privileges fails, the last thing we want to do is to
just move on with root privs, having warned or not. If the pipe
to the parent process is closed, that almost certainly means that
the parent process went away, and it absolutely certainly means
that the table handler process has no meaningful reason to exist
any more, thus bail. ok florian ccardenas krw
2018-07-03 12:51 krw
* usr.sbin/dhcpd/dhcpd.conf.5: Tighten up description of
echo-client-id statement to make it clearer. Explicitly mention
that older printers may require it to be set to false, as this
has come up on the mailing lists a few times.
Original diff from sthen@.
ok jmc@
2018-03-01 20:48 jmc
* usr.sbin/dhcpd/dhcpd.conf.5: consistently spell "IPsec"; from raf
czlonka
note that this is only part of raf's original diff: the rest is
for code. although i'm sure the diff itself is correct, i don;t
judge myself qualified to decide whether those changes are
warranted. still, i'd appreciate at least a reply to raf's diff
from another developer (yay! nay!)
2018-02-28 19:49 matthieu
* usr.sbin/dhcpd/dhcp-options.5: Better documentation of the
classless-static-routes option. ok krw@, tweaks by jmc@
2017-08-29 08:20 jmc
* usr.sbin/dhcpd/dhcpd.8: do not claim that this is isc dhcpd (but
retain credit); issue pointed out by miod
ok krw miod
2017-08-04 02:01 rob
* usr.sbin/dhcpd/dhcpd.h: Remove unused structs and defines, from
Edgar Pettijohn. ok jca@
2017-07-31 19:00 rob
* usr.sbin/dhcpd/dhcpd.h: Removed unused struct, also noticed by
Edgar Pettijohn. ok jca@, krw@
2017-07-11 10:28 reyk
* usr.sbin/dhcpd/dhcp.c: Handle DHCPINFORM from clients behind a
DHCP relay.
The dhcpinform() function has assumed that ciaddr matches the
packet's IP source address and didn't consider a relay, such as
dhcrelay(8) - indicated by giaddr, has forwarded the request.
Tested by landry@ OK krw@
2017-06-28 14:07 jmc
* usr.sbin/dhcpd/dhcpd.conf.5: remove a contradictory sentence (see
dhcp-options(5)) which claims hostnames which resolve to muliple
ip addresses are all forwarded to the client;
issue reported by edgar pettijohn; discussed with dhcpd's de
facto maintainer, kenneth westerback;
2017-05-03 02:22 jsg
* usr.sbin/dhcpd/: conflex.c, confpars.c, dhcp.c, dhcpd.conf.5,
dhcpd.h, dhctoken.h: OpenBSD 6.1 errata 001, May 2, 2017
dhcpd(8) unconditionally echoed client identifier. Add parameter
"echo-client-id" to allow this behaviour to be turned off.
2017-04-26 21:07 jmc
* usr.sbin/dhcpd/dhcpd.conf.5: remove some repetitive text chunks;
ok krw
2017-04-24 18:05 jmc
* usr.sbin/dhcpd/dhcpd.conf.5: a little more consistent text for
previous; ok krw
2017-04-24 14:58 krw
* usr.sbin/dhcpd/: conflex.c, confpars.c, dhcp.c, dhcpd.conf.5,
dhcpd.h, dhctoken.h: Add 'echo-client-id' statment, so that RFC
6842 behaviour can be turned off for those clients and networks
that find it impossible to move past RFC 2131. Modelled on the
same statement in recent ISC versions, though we default to 'on'
(a.k.a. RFC 6842) rather that 'off' (a.k.a. RFC 2131).
Problems reported by Bastien Durel (Xerox Phaser 6022 printer)
and Bryan Vyhmeister (Hon Hai Precision router) via misc@.
Thanks!
2017-04-19 05:36 natano
* usr.sbin/dhcpd/bpf.c: Switch base tools from /dev/bpf0 to
/dev/bpf. Now that /dev/bpf has been around for two releases, it
should be safe to do so.
ok bluhm deraadt sthen tb yasuoka
2017-04-18 13:59 krw
* usr.sbin/dhcpd/: bpf.c, dhcpd.h, packet.c: Tweak parameters to
decode_*, add a check or two, and thus gain most of the sanity
improvements reyk@ recently put into dhcrelay to ensure no more
than the captured packet is processed.
2017-04-18 13:44 krw
* usr.sbin/dhcpd/bpf.c: After 11 years of pondering about it I
think that [email protected] had it correct. Don't
BPF_WORDALIGN() the value for the number of bytes read() into the
buffer. This could theoretically cause the processing of 1 - 3
more bytes than were read.
2017-04-17 18:31 krw
* usr.sbin/dhcpd/: dhcpd.h, packet.c: Use better types for
checksum() parameters and local var from dhclient. Eliminate
extra prototypes for checksum() and wrapsum().
2017-04-13 14:59 krw
* usr.sbin/dhcpd/dhcpd.h: Remove a bunch of obsolete, unused and
irrelevant DHCP client types, fields, and enums.
2017-04-12 19:19 krw
* usr.sbin/dhcpd/Makefile: Inspired by recent dhcrelay changes,
bring in stricter CFLAGS!
2017-04-12 19:17 krw
* usr.sbin/dhcpd/dispatch.c: One 'foo' per function is enough.
Rename one to eliminate shadowing.
2017-04-12 19:12 krw
* usr.sbin/dhcpd/: conflex.c, confpars.c: Add missing function
prototypes. Mark kw_cmp() as static like all its friends.
2017-03-21 12:06 bluhm
* usr.sbin/dhcpd/log.c: From a syslog perspective it does not make
sense to log fatal and warn with the same severity. Switch
log_warn() to LOG_ERR and keep fatal() at LOG_CRIT. OK reyk@
florian@
2017-02-16 00:24 krw
* usr.sbin/dhcpd/: dhcpd.c, dhcpd.h, parse.c: Bring parse_warn()
into the log.[ch] 21st century and adopt the "^" placement logic
from dhclient.
2017-02-15 19:36 krw
* usr.sbin/dhcpd/dhcpd.8: Adopt the common verbiage other log.[ch]
daemons use to describe '-d'.
Point out that dhcpd(8) -f is an alias for -d.
2017-02-13 23:04 krw
* usr.sbin/dhcpd/: bpf.c, confpars.c, db.c, dhcp.c, dhcpd.c,
dhcpd.h, dispatch.c, icmp.c, memory.c, parse.c, pfutils.c,
sync.c: Eliminate pointless'%m' (a.k.a. hand rolled strerror())
by using fatal() and log_warn(). Zap a couple of explicit
'syslog()' calls.
2017-02-13 22:33 krw
* usr.sbin/dhcpd/: bootp.c, conflex.c, confpars.c, dhcp.c, dhcpd.c,
dhcpd.h, dispatch.c, icmp.c, memory.c, options.c, parse.c,
sync.c, udpsock.c: Adjust some long lines.
2017-02-13 21:53 krw
* usr.sbin/dhcpd/: dispatch.c, pfutils.c, sync.c, udpsock.c: Do the
strerror() elimination dance with log_warnx() -> log_warn(),
fatalx() -> fatal() and even a couple of fprintf(stderr) ->
log_warn().
2017-02-13 19:19 krw
* usr.sbin/dhcpd/errwarn.c: Banished to the attic.
2017-02-13 19:13 krw
* usr.sbin/dhcpd/: Makefile, alloc.c, bootp.c, bpf.c, confpars.c,
db.c, dhcp.c, dhcpd.c, dhcpd.h, dispatch.c, hash.c, icmp.c,
log.c, log.h, memory.c, options.c, packet.c, parse.c, pfutils.c,
sync.c, tables.c, tree.c, udpsock.c: Switch from old errwarn.c
logging to shiny new log.[ch].
ok benno@
2017-02-11 16:12 krw
* usr.sbin/dhcpd/: dhcpd.h, errwarn.c, parse.c: Move
parse_warning() into parse.c to prepare to replace errwarn.c with
standard daemon log.[ch].
ok mpi@
2017-02-04 22:21 jca
* usr.sbin/dhcpd/dhcpd.conf.5: Appropriately replace "domain name"
with "hostname"; less misleading
tb@ was initially concerned about next-server but there were more
similar occurrences. Simple solution - "hostname" - proposed by
jmc@ ok from both
2016-11-15 10:49 mestre
* usr.sbin/dhcpd/: dispatch.c, icmp.c, options.c, pfutils.c:
Replace bzero(3) with memset(3)
"Looks good" to deraadt@
2016-10-24 21:05 krw
* usr.sbin/dhcpd/dhcp.c: Compare server-identifiers and reject
packets only *after* applying value specified in dhcpd.conf.
i.e. don't assume it is always the primary address of the
interface the packet arrived on.
Fixes issues with redundant dhcpd servers and CARP'd interfaces.
Issue reported and fix tested by Johan Huldtgren
2016-10-21 11:34 mestre
* usr.sbin/dhcpd/sync.c: - Use memset(*b, 0, len) instead of
bzero(*b, len) - Use explicit_bzero(3) instead of bzero(3) to
clean temporary HMAC
OK krw@
2016-10-12 13:36 krw
* usr.sbin/dhcpd/dhcp.c: client_identifier is not a string so using
strlen() on it is inappropriate. Which is why
client_identifier_len exists.
Replace copy&pasted strlen() with client_identifier_len.
Symptoms (crash) and cause (bad c&p) spotted by sthen@.
tested & ok sthen@
2016-10-10 15:53 krw
* usr.sbin/dhcpd/dhcp.c: Stop pretending we use RFC 3046/Option
82/Relay Agent Information.
RFC 3042 says servers that do not understand the option will not
echo it.
Plus, our desultory attempt at echoing was almost certainly
broken for OFFERs (use after free of packet data) and not even
attempted for NACKs.
ok millert@
2016-10-06 16:12 krw
* usr.sbin/dhcpd/: dhcp.c, dhcpd.h: Add support for RFC 6842. RFC
2131 said the server MUST NOT echo the client-identifier value.
RFC 6842 says the server MUST echo it.
Echoing the information disambiguates packets for relays and
clients when chaddr is 0. Similar to what dhcpv6 does.
2016-10-05 00:50 krw
* usr.sbin/dhcpd/dhcp.c: Use consistant idiom (intermediate
variable 'i' rather than repeated uses of very long #define
names) to access option data in nak_lease() and ack_lease().
Shortens a lot of lines, which allows a number of line splits to
be eliminates.
Makes some upcoming diffs easier to integrate.
No intentional functional change.
2016-10-04 22:47 krw
* usr.sbin/dhcpd/: dhcp.c, options.c, sync.c, sync.h: Zap stray
whitespace.
2016-08-27 01:26 guenther
* usr.sbin/dhcpd/: db.c, dhcpd.c, dispatch.c, parse.c: Pull in
<time.h> for one or more of gmtime, strftime, strptime, time,
timegm, and tzset
ok deraadt@
2016-08-17 00:55 krw
* usr.sbin/dhcpd/confpars.c: KNF and clean up many comments.
2016-08-17 00:38 krw
* usr.sbin/dhcpd/confpars.c: Ansify function definitions.
Diff from Edgar Pettijohn.
2016-08-05 14:02 krw
* usr.sbin/dhcpd/: dhcp.c, dhcpd.h, options.c: Don't leak the
option data of non-DHCPINFORM messages received on the udp
socket.
Found by David Carlier.
ok yasuoka@
2016-05-28 07:00 natano
* usr.sbin/dhcpd/bpf.c: Replace the /dev/bpf* open loop with a
plain open("/dev/bpf0", ...). ok deraadt jca
2016-04-27 10:16 mestre
* usr.sbin/dhcpd/: dhcpd.c, udpsock.c: Remove pledge(2)'s that are
called before chroot(2) since in the near future this will be
forbidden. The remaining pledge(2) calls after chroot(2) are
still kept.
OK semarie@ "it is time now"
2016-04-04 14:00 mestre
* usr.sbin/dhcpd/udpsock.c: In udpsockmode codepath dhcpd.c had the
promise route for pledge(2) but it was missing from
udpsock_startup() (udpsock.c) which happens earlier and therefore
would abort the program due to SIOCGIFADDR ioctl(2) on
udpsock_handler
Reported by Philip Higgins <phil ! unita.com.au>
OK tb@
2016-02-08 02:06 krw
* usr.sbin/dhcpd/udpsock.c: sys/param.h -> sys/types.h. No need to
drag in nitems() only to use it once on an array declared iov[1].
Just use '1'.
ok yasuoka@
2016-02-07 10:24 jsg
* usr.sbin/dhcpd/memory.c: avoid a use after free when parsing
address ranges from a config ok krw@
2016-02-06 23:50 krw
* usr.sbin/dhcpd/: alloc.c, bootp.c, bpf.c, conflex.c, confpars.c,
convert.c, db.c, dhcp.c, dhcpd.c, dhcpd.h, dispatch.c, errwarn.c,
hash.c, icmp.c, inet.c, memory.c, options.c, packet.c, parse.c,
pfutils.c, print.c, sync.c, tables.c, tree.c, udpsock.c:
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@.
2016-02-03 14:48 krw
* usr.sbin/dhcpd/packet.c: be very careful accepting packets via
bpf. First check that the fixed part of the IP header is
completely present before using its header length field. Then
use the data in the IP header to ensure the entire IP packet is
present. Then check that the entire UDP header is present. Then
use the data in the UDP header to ensure all the data it thinks
is present is actually present.
Started when tj@ and a few others noticed ISC "DHCP
CVE-2015-8605: UDP payload length not properly checked".
ok sthen@ henning@
2015-12-21 21:39 mmcc
* usr.sbin/dhcpd/: alloc.c, dhcp.c, tree.c: remove NULL-checks
before free()
2015-12-14 01:08 krw
* usr.sbin/dhcpd/: dhcpd.c, udpsock.c: pledge.
Diff from Ricardo Mestre. Test report from sthen@.
2015-12-11 14:09 krw
* usr.sbin/dhcpd/parse.c: Actually use default-lease-time,
max-lease-time, bootp-lease-length specified in dhcpd.conf.
Broken in -r1.18.
Problem noted by Arne on bugs@, identical fix independently
developed by Serguey Parkhomovsky.
2015-09-14 20:06 schwarze
* usr.sbin/dhcpd/dhcp-options.5: Avoid .Ns right after .Pf, it's
pointless. In some cases, do additional cleanup in the immediate
vicinity.
2015-08-20 22:39 deraadt
* usr.sbin/dhcpd/: confpars.c, dhcp.c, dispatch.c: stdlib.h is in
scope; do not cast malloc/calloc/realloc* ok millert krw
2015-07-27 18:48 sobrado
* usr.sbin/dhcpd/dhcpd.leases.5: use file system path (.Pa)
semantic markup macros where appropriate.
2015-06-27 14:29 krw
* usr.sbin/dhcpd/: options.c, tables.c: Do not send routers (option
3) or static routes (option 33) when classless static routes
(option 121, 249) are sent. RFC 3442 says servers SHOULD NOT send
those options.
This avoids confusing clients who fail to ignore the routers or
static routes options in the presence of classless static routes
options. RFC 3442 says clients MUST ignore those options.
Incorrect behavior in MS and Linux clients reported by Juan on
misc@.
ok millert@
2015-06-11 12:48 schwarze
* usr.sbin/dhcpd/dhcpd.conf.5: Don't do manual whitespace
adjustments inside semantic macros, rather do it before the
macros, and get rid of cargo cult escaping. Both to make the
code more robust and less ugly, no output change. Ugly code
reported by TJ at mrsk dot me. OK jmc@
2015-06-02 16:02 sobrado
* usr.sbin/dhcpd/dhcp-options.5: write Mobile IP{,v6} in a
consistent way, as given in RFCs 5944 and 6275.
ok jmc@
2015-05-18 17:51 krw
* usr.sbin/dhcpd/: conflex.c, confpars.c, parse.c: 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.
2015-05-02 14:29 krw
* usr.sbin/dhcpd/conflex.c: 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.
2015-05-02 12:37 krw
* usr.sbin/dhcpd/conflex.c: 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.
2015-04-15 12:40 krw
* usr.sbin/dhcpd/dhcp.c: Avoid using inet_ntoa() twice in a single
printf() parameter list by caching the results from excess
inet_ntoa() calls before doing the printf(). Should improve
usefullness (?) of DHCPRELEASE log entries by actually printing
ciaddr and giaddr correctly when dhcprelays stand between servers
and clients.
Looks good to dlg@.
2015-03-13 19:58 jmc
* usr.sbin/dhcpd/: dhcpd.8, dhcpd.conf.5: remove the first comma
from constructs like ", and," and ", or,": you can use "and" and
"or" to join sentence clauses, and you can use commas, but both
hinders reading;
2015-02-10 23:06 krw
* usr.sbin/dhcpd/: dhcpd.c, memory.c: Keep track of the last time
we scanned the leases to find expired ones that needed to be
booted out of the pf table process. This avoids removing the same
addess over and over.
Problem report and original diff from Bertrand Provost.
2015-02-07 10:49 krw
* usr.sbin/dhcpd/dhcpd.c: Close appropriate ends of pfpipe. Lets pf
table process die when dhcpd does.
Pointed out by Bertrand Provost.
ok henning@
2015-02-05 09:42 krw
* usr.sbin/dhcpd/pfutils.c: The pf table process should die if the
pipe to the dhcpd process is closed. e.g. dhcpd has been killed.
ok henning@
2015-01-21 21:50 deraadt
* usr.sbin/dhcpd/pfutils.c: Include <netinet/in.h> before
<net/pfvar.h>. In a future change when ports is ready,
<net/pfvar.h> will stop including a pile of balony.
2015-01-16 06:40 deraadt
* usr.sbin/dhcpd/: dhcpd.c, pfutils.c, sync.c, udpsock.c: 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)
2014-11-22 18:15 deraadt
* usr.sbin/dhcpd/dhcpd.8: /dev/random has created the same effect
as /dev/arandom (and /dev/urandom) for quite some time. Mop up
the last few, by using /dev/random where we actually want it, or
not even mentioning arandom where it is irrelevant.
2014-11-15 14:41 bentley
* usr.sbin/dhcpd/dhcpd.leases.5: Reduce instances of `` '' in
manuals.
troff displays these as typographic quotes, but nroff
implementations almost always print them literally, which rarely
has the intended effect with modern fonts, even in stock xterm.
These uses of `` '' can be replaced either with more semantic
alternatives or with Dq, which prints typographic quotes in a
UTF-8 locale (but will automatically fall back to `` '' in an
ASCII locale).
improvements and ok schwarze@
2014-11-11 19:59 krw
* usr.sbin/dhcpd/dhcp.c: Tweak the the DHCPACK to DHCPINFORM log
entry so that it is less threatening and more informative.
e.g.
DHCPACK on <null address> to 5c:51:4f:56:81:c3 via em0
changes to
DHCPACK to 192.168.19.62 (3c:97:0e:0c:0c:d7) via em0
Issue noted and diff tested by Marc Peters. Thanks!
ok yasuoka@ millert@
2014-11-10 13:03 krw
* usr.sbin/dhcpd/dhcp.c: Typo: consitent -> consistent.
2014-10-25 03:23 lteo
* usr.sbin/dhcpd/: bpf.c, icmp.c, packet.c: Remove unnecessary
netinet/in_systm.h include.
ok millert@
2014-10-08 04:26 deraadt
* usr.sbin/dhcpd/dispatch.c: use reallocarray() to cope with
multiplicative integer overflow; ok doug
2014-08-18 20:58 tobias
* usr.sbin/dhcpd/packet.c: Variables to count seen packets should
be unsigned.
ok krw@
2014-08-11 18:39 tobias
* usr.sbin/dhcpd/dhcp.c: validate len field for proper length, not
just "not zero."
ok krw@
2014-07-29 18:21 tobias
* usr.sbin/dhcpd/: options.c: Fix memory exhaustion occurring on
DHCP options with 0 length.
halex@ and krw@ pointed out that a NULL check before free can go,
too.
ok deraadt@, halex@, krw@, jasper@
2014-07-28 16:45 tobias
* usr.sbin/dhcpd/options.c: Fix memory exhaustion occurring on DHCP
options with 0 length.
halex@ and krw@ pointed out that a NULL check before free can go,
too.
ok deraadt@, halex@, krw@
2014-07-26 07:48 tobias
* usr.sbin/dhcpd/packet.c: Fix very hard to reach DoS attack
vector, which would involve more than 8 billion network packets.
Mixture of many many malformed and proper packets could result in
a division by zero.
ok krw@
2014-07-11 21:20 deraadt
* etc/examples/dhcpd.conf: Move more files into the examples
directory...
2014-07-11 16:48 yasuoka
* usr.sbin/dhcpd/: dhcp.c, dhcpd.h: Fix DHCPINFORM not to lookup
the lease database, not to fill the yiaddr field and not to
include the lease time parameters.
ok krw
2014-07-11 13:53 jmc
* usr.sbin/dhcpd/dhcpd.8: tweak previous; ok krw yasuoka
2014-07-11 09:44 yasuoka
* usr.sbin/dhcpd/dhcpd.8: Fix typo
2014-07-11 09:42 yasuoka
* usr.sbin/dhcpd/: Makefile, bootp.c, bpf.c, dhcp.c, dhcpd.8,
dhcpd.c, dhcpd.h, options.c, udpsock.c: Add -u option to bind UDP
port as a socket to answer DHCPINFORM from the clients on non
ethernet interfaces (eg. tun(4) or pppx(4)).
input krw ok krw
2014-07-09 13:42 yasuoka
* usr.sbin/dhcpd/confpars.c: Fix classless-{ms-,}static-routes to
comply RFC 3442. Number of octets should be changed by
corresponding to the prefix length. And 0 should be allowed for
the prefix length. Also fix white spaces.
Based on diff from Yuuichi Someya.
ok krw
2014-06-11 16:45 pelikan
* usr.sbin/dhcpd/: bootp.c, memory.c: Prettify & refactor, no
functional change.
ok beck
2014-05-07 13:20 pelikan
* usr.sbin/dhcpd/: dhcpd.c, dhcpd.h, icmp.c: back out the previous
ICMP simplifying diff, it caused livelocks.
reported by Mikolaj Kucharski, thanks! ok krw