diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-04-15 14:55:13 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-04-15 14:55:13 +0000 |
commit | 212b26394887ee3c41510adacde36bc5c0ebfa21 (patch) | |
tree | bad93b266e2961ff38afdfb11359ebfe8a23c7fd /usr.sbin/ldpd | |
parent | 9f575e42cf76017d97f9f9e632869be9076d308e (diff) |
struct ldp_hdr has probably the worst possible layout (ending with a single
u_int16_t) and must therefor be __packed or sizeof() returns a to large size
and causes some very nasty issues.
"embrace __packed" dlg@ OK michele@
While there add new notification status types defined in RFC5036
Diffstat (limited to 'usr.sbin/ldpd')
-rw-r--r-- | usr.sbin/ldpd/ldp.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/ldpd/ldp.h b/usr.sbin/ldpd/ldp.h index bc85ae7b836..4f4a0e51b22 100644 --- a/usr.sbin/ldpd/ldp.h +++ b/usr.sbin/ldpd/ldp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ldp.h,v 1.3 2010/02/25 17:40:46 claudio Exp $ */ +/* $OpenBSD: ldp.h,v 1.4 2010/04/15 14:55:12 claudio Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -91,7 +91,7 @@ struct ldp_hdr { u_int16_t length; u_int32_t lsr_id; u_int16_t lspace_id; -}; +} __packed; #define LDP_HDR_SIZE 10 #define INFINITE_HOLDTIME 0xffff @@ -146,6 +146,8 @@ struct hello_prms_tlv { #define S_LAB_REQ_ABRT 0x00000015 #define S_MISS_MSG 0x00000016 #define S_UNSUP_ADDR 0x00000017 +#define S_KEEPALIVE_BAD 0x80000018 +#define S_INTERN_ERR 0x80000019 struct sess_prms_tlv { u_int16_t type; |