CVSROOT:        /cvs
Module name:    src
Changes by:     r...@cvs.openbsd.org    2017/04/05 08:40:56

Modified files:
        usr.sbin/dhcrelay: bpf.c dhcpd.h packet.c 

Log message:
Rework the packet.c code for decoding and assembling DHCP messages.

This code suffered from many years of incremental improvements, fix it to:
- verify available buffer space in all cases and don't just trust the caller
- have an API where you always pass the full buffer length and absolute offset
- use consistent types for lengths and buffer offsets (int vs. size_t, ssize_t)
- don't just ignore errors, return and fail when something is wrong

OK rzalamena@

Reply via email to