diff options
author | Renato Westphal <renato@cvs.openbsd.org> | 2015-07-19 20:54:18 +0000 |
---|---|---|
committer | Renato Westphal <renato@cvs.openbsd.org> | 2015-07-19 20:54:18 +0000 |
commit | 9a2afa8acf1879cf27b958867ec93b8685463544 (patch) | |
tree | a93a894585cf78bb551fc46620da5aa9d007910c /usr.sbin/ldpd/ldpd.h | |
parent | d5090c4ffd20eb040b8d194bf803318547553814 (diff) |
Rework label mapping algorithms to be more in line with the RFC.
This patch presents a thoroughly review of the label mapping
algorithms. Most of the changes are minor bug fixes in the handling of
received label messages.
Additional improvements:
* Add a few more references to the Appendix A of the RFC5036 ("LDP
Label Distribution Procedures") into the code;
* Add full multipath support;
* Send label withdraws when appropriate;
* Add label withdraw/release wildcard support.
NOTE: As a result of implementing only the "Liberal Label Retention" and
"Downstream Unsolicited" modes, we will never send a label request
("Request Never"). And that means that we can ignore the following
notification messages: "Label Request Aborted", "No Label Resources",
"No Route" and "Label Resources Available". The following algorithms
mentioned in the RFC can also be ignored: "Timeout of Deferred Label
Request", "Detect Local Label Resources Have Become Available" and
"Receive Label Abort Request".
Now, considering that we only support one combination of all modes of
operation, we can say that we have an almost complete implementation of
the protocol.
ok claudio@
Diffstat (limited to 'usr.sbin/ldpd/ldpd.h')
-rw-r--r-- | usr.sbin/ldpd/ldpd.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/ldpd/ldpd.h b/usr.sbin/ldpd/ldpd.h index 31dd4342122..ed600251b57 100644 --- a/usr.sbin/ldpd/ldpd.h +++ b/usr.sbin/ldpd/ldpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ldpd.h,v 1.47 2015/07/19 20:50:03 renato Exp $ */ +/* $OpenBSD: ldpd.h,v 1.48 2015/07/19 20:54:17 renato Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -99,6 +99,8 @@ enum imsg_type { IMSG_MAPPING_ADD_END, IMSG_RELEASE_ADD, IMSG_RELEASE_ADD_END, + IMSG_WITHDRAW_ADD, + IMSG_WITHDRAW_ADD_END, IMSG_ADDRESS_ADD, IMSG_ADDRESS_DEL, IMSG_NOTIFICATION_SEND, @@ -160,15 +162,14 @@ TAILQ_HEAD(mapping_head, mapping_entry); struct map { struct in_addr prefix; + u_int8_t prefixlen; u_int32_t label; u_int32_t messageid; u_int32_t requestid; - u_int8_t prefixlen; u_int8_t flags; }; #define F_MAP_WILDCARD 0x01 /* wildcard FEC */ -#define F_MAP_OPTLABEL 0x02 /* optional label present */ -#define F_MAP_REQ_ID 0x04 /* optional request message id present */ +#define F_MAP_REQ_ID 0x02 /* optional request message id present */ struct notify_msg { u_int32_t messageid; |