diff options
Diffstat (limited to 'ldpd/packet.c')
| -rw-r--r-- | ldpd/packet.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/ldpd/packet.c b/ldpd/packet.c index b085cac055..a7be0f6b42 100644 --- a/ldpd/packet.c +++ b/ldpd/packet.c @@ -519,13 +519,7 @@ session_read(struct thread *thread) return (0); } break; - case MSG_TYPE_ADDR: - case MSG_TYPE_ADDRWITHDRAW: - case MSG_TYPE_LABELMAPPING: - case MSG_TYPE_LABELREQUEST: - case MSG_TYPE_LABELWITHDRAW: - case MSG_TYPE_LABELRELEASE: - case MSG_TYPE_LABELABORTREQ: + default: if (nbr->state != NBR_STA_OPER) { session_shutdown(nbr, S_SHUTDOWN, msg->id, msg->type); @@ -533,8 +527,6 @@ session_read(struct thread *thread) return (0); } break; - default: - break; } /* switch LDP packet type */ @@ -548,6 +540,9 @@ session_read(struct thread *thread) case MSG_TYPE_KEEPALIVE: ret = recv_keepalive(nbr, pdu, msg_size); break; + case MSG_TYPE_CAPABILITY: + ret = recv_capability(nbr, pdu, msg_size); + break; case MSG_TYPE_ADDR: case MSG_TYPE_ADDRWITHDRAW: ret = recv_address(nbr, pdu, msg_size); @@ -564,7 +559,7 @@ session_read(struct thread *thread) log_debug("%s: unknown LDP message from nbr %s", __func__, inet_ntoa(nbr->id)); if (!(ntohs(msg->type) & UNKNOWN_FLAG)) - send_notification_nbr(nbr, + send_notification(nbr->tcp, S_UNKNOWN_MSG, msg->id, msg->type); /* ignore the message */ ret = 0; @@ -632,7 +627,7 @@ session_shutdown(struct nbr *nbr, uint32_t status, uint32_t msg_id, case NBR_STA_OPER: log_debug("%s: lsr-id %s", __func__, inet_ntoa(nbr->id)); - send_notification_nbr(nbr, status, msg_id, msg_type); + send_notification(nbr->tcp, status, msg_id, msg_type); nbr_fsm(nbr, NBR_EVT_CLOSE_SESSION); break; @@ -788,7 +783,7 @@ pending_conn_timeout(struct thread *thread) * notification message reliably. */ tcp = tcp_new(pconn->fd, NULL); - send_notification(S_NO_HELLO, tcp, 0, 0); + send_notification(tcp, S_NO_HELLO, 0, 0); msgbuf_write(&tcp->wbuf.wbuf); pending_conn_del(pconn); |
