CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2016/05/23 10:08:18
Modified files:
usr.sbin/ldpd : Makefile hello.c ldpd.h packet.c parse.y
Added files:
usr.sbin/ldpd : util.c
Log message:
Several improvements in the parsing of UDP/Hello packets.
* Fix check of the packet's size and the "PDU Length" field;
* Add check for the "Message Length" field;
* Check for invalid labelspace earlier.
* Use if_lookup() on disc_recv_iface() to reduce one level of identation;
Additionally, add the following safeguards:
* Check for unicast link hellos;
* Check for multicast targeted hellos;
* Validate packet's source address;
* Validate received transport-address.
Put the ancillary function bad_ip_addr() into a new file, util.c, which
will be used later for several other things.