diff options
author | Renato Westphal <renato@cvs.openbsd.org> | 2017-03-04 00:06:11 +0000 |
---|---|---|
committer | Renato Westphal <renato@cvs.openbsd.org> | 2017-03-04 00:06:11 +0000 |
commit | 512924baf176079550a3e543d949bc8ab73cf778 (patch) | |
tree | 99ae0fe570c15063f701ef6a06b3d4c5ac7c4f3b /usr.sbin/ldpd/packet.c | |
parent | f0cbdab642f0c88a7edb19fb0e8cf2a44ee3acee (diff) |
Implement RFC 5561 (LDP Capabilities).
This patch per-se doesn't introduce any useful functionality, but prepares
the ground for new enhancements to ldpd (i.e. implementation of new RFCs
that make use of LDP capabilities).
Diffstat (limited to 'usr.sbin/ldpd/packet.c')
-rw-r--r-- | usr.sbin/ldpd/packet.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/usr.sbin/ldpd/packet.c b/usr.sbin/ldpd/packet.c index cfb9d2265d1..1e03a09bcee 100644 --- a/usr.sbin/ldpd/packet.c +++ b/usr.sbin/ldpd/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.69 2017/03/03 23:44:35 renato Exp $ */ +/* $OpenBSD: packet.c,v 1.70 2017/03/04 00:06:10 renato Exp $ */ /* * Copyright (c) 2013, 2016 Renato Westphal <renato@openbsd.org> @@ -518,13 +518,7 @@ session_read(int fd, short event, void *arg) return; } 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); @@ -532,8 +526,6 @@ session_read(int fd, short event, void *arg) return; } break; - default: - break; } /* switch LDP packet type */ @@ -547,6 +539,9 @@ session_read(int fd, short event, void *arg) 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); |