diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-04-15 14:47:13 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-04-15 14:47:13 +0000 |
commit | 9f575e42cf76017d97f9f9e632869be9076d308e (patch) | |
tree | 4fd53bcc8a6542be0d1acafb19de7de5b73dc567 /usr.sbin/ldpd | |
parent | 012447d6873603018914152902e462ea67e34950 (diff) |
Even though label withdraw, release, and abort requests are not fully
implemented use a correct return value so that ldpd has a chance to survive
when one of those messages are received.
OK michele@
Diffstat (limited to 'usr.sbin/ldpd')
-rw-r--r-- | usr.sbin/ldpd/labelmapping.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/usr.sbin/ldpd/labelmapping.c b/usr.sbin/ldpd/labelmapping.c index b7f6c2c7773..639ee24308c 100644 --- a/usr.sbin/ldpd/labelmapping.c +++ b/usr.sbin/ldpd/labelmapping.c @@ -1,4 +1,4 @@ -/* $OpenBSD: labelmapping.c,v 1.7 2010/02/25 17:40:46 claudio Exp $ */ +/* $OpenBSD: labelmapping.c,v 1.8 2010/04/15 14:47:12 claudio Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -255,7 +255,7 @@ recv_labelrequest(struct nbr *nbr, char *buf, u_int16_t len) nbr_fsm(nbr, NBR_EVT_PDU_RCVD); - return (0); + return (ntohs(lr->length)); } /* Label Withdraw Message */ @@ -325,9 +325,11 @@ recv_labelwithdraw(struct nbr *nbr, char *buf, u_int16_t len) buf += sizeof(struct ldp_msg); len -= sizeof(struct ldp_msg); + /* XXX XXX */ + nbr_fsm(nbr, NBR_EVT_PDU_RCVD); - return (0); + return (ntohs(lw->length)); } /* Label Release Message */ @@ -397,9 +399,11 @@ recv_labelrelease(struct nbr *nbr, char *buf, u_int16_t len) buf += sizeof(struct ldp_msg); len -= sizeof(struct ldp_msg); + /* XXX XXX XXX */ + nbr_fsm(nbr, NBR_EVT_PDU_RCVD); - return (0); + return (ntohs(lr->length)); } /* Label Abort Req Message */ @@ -448,9 +452,11 @@ recv_labelabortreq(struct nbr *nbr, char *buf, u_int16_t len) buf += sizeof(struct ldp_msg); len -= sizeof(struct ldp_msg); + /* XXX XXX XXX */ + nbr_fsm(nbr, NBR_EVT_PDU_RCVD); - return (0); + return (ntohs(la->length)); } /* Other TLV related functions */ |