diff options
author | Renato Westphal <renato@cvs.openbsd.org> | 2016-05-23 16:08:19 +0000 |
---|---|---|
committer | Renato Westphal <renato@cvs.openbsd.org> | 2016-05-23 16:08:19 +0000 |
commit | 91ec63a6cc84ab519bdb3d5333da436b8b9a2647 (patch) | |
tree | 165323bcc28becfcbc217e6e1d05e9ec27de1cc9 /usr.sbin/ldpd/ldpd.h | |
parent | 960a41bce4d794d6d183c192d4ee2fd1f6021296 (diff) |
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.
Diffstat (limited to 'usr.sbin/ldpd/ldpd.h')
-rw-r--r-- | usr.sbin/ldpd/ldpd.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/ldpd/ldpd.h b/usr.sbin/ldpd/ldpd.h index 0cf11845c2e..c40a1a072c9 100644 --- a/usr.sbin/ldpd/ldpd.h +++ b/usr.sbin/ldpd/ldpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ldpd.h,v 1.57 2016/05/23 14:59:50 renato Exp $ */ +/* $OpenBSD: ldpd.h,v 1.58 2016/05/23 16:08:18 renato Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -464,6 +464,9 @@ const char *if_state_name(int); const char *if_type_name(enum iface_type); const char *notification_name(u_int32_t); +/* util.c */ +int bad_ip_addr(struct in_addr); + /* ldpd.c */ void main_imsg_compose_ldpe(int, pid_t, void *, u_int16_t); void main_imsg_compose_lde(int, pid_t, void *, u_int16_t); |