diff options
Diffstat (limited to 'ldpd/lde.c')
| -rw-r--r-- | ldpd/lde.c | 40 | 
1 files changed, 40 insertions, 0 deletions
diff --git a/ldpd/lde.c b/ldpd/lde.c index 2392dbf6d0..e64f18dfc9 100644 --- a/ldpd/lde.c +++ b/ldpd/lde.c @@ -319,6 +319,13 @@ lde_dispatch_imsg(struct thread *thread)  			case S_PW_STATUS:  				l2vpn_recv_pw_status(ln, &nm);  				break; +			case S_ENDOFLIB: +				/* +				 * Do nothing for now. Should be useful in +				 * the future when we implement LDP-IGP +				 * Synchronization (RFC 5443) and Graceful +				 * Restart (RFC 3478). +				 */  			default:  				break;  			} @@ -1099,6 +1106,38 @@ lde_send_notification(struct lde_nbr *ln, uint32_t status_code, uint32_t msg_id,  	    &nm, sizeof(nm));  } +void +lde_send_notification_eol_prefix(struct lde_nbr *ln, int af) +{ +	struct notify_msg nm; + +	memset(&nm, 0, sizeof(nm)); +	nm.status_code = S_ENDOFLIB; +	nm.fec.type = MAP_TYPE_TYPED_WCARD; +	nm.fec.fec.twcard.type = MAP_TYPE_PREFIX; +	nm.fec.fec.twcard.u.prefix_af = af; +	nm.flags |= F_NOTIF_FEC; + +	lde_imsg_compose_ldpe(IMSG_NOTIFICATION_SEND, ln->peerid, 0, +	    &nm, sizeof(nm)); +} + +void +lde_send_notification_eol_pwid(struct lde_nbr *ln, uint16_t pw_type) +{ +	struct notify_msg nm; + +	memset(&nm, 0, sizeof(nm)); +	nm.status_code = S_ENDOFLIB; +	nm.fec.type = MAP_TYPE_TYPED_WCARD; +	nm.fec.fec.twcard.type = MAP_TYPE_PWID; +	nm.fec.fec.twcard.u.pw_type = pw_type; +	nm.flags |= F_NOTIF_FEC; + +	lde_imsg_compose_ldpe(IMSG_NOTIFICATION_SEND, ln->peerid, 0, +	    &nm, sizeof(nm)); +} +  static __inline int  lde_nbr_compare(struct lde_nbr *a, struct lde_nbr *b)  { @@ -1116,6 +1155,7 @@ lde_nbr_new(uint32_t peerid, struct lde_nbr *new)  	ln->id = new->id;  	ln->v4_enabled = new->v4_enabled;  	ln->v6_enabled = new->v6_enabled; +	ln->flags = new->flags;  	ln->peerid = peerid;  	fec_init(&ln->recv_map);  	fec_init(&ln->sent_map);  | 
