diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2013-06-04 02:34:49 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2013-06-04 02:34:49 +0000 |
commit | 58e79569174ae7812da7dbfc19b71709322a4c20 (patch) | |
tree | 5bdcc2b6d15a01c14a7f7bd4ab668c4358c524db /usr.sbin/ldpd/labelmapping.c | |
parent | 15bd6634743ea4d81165efd81c60d5aa3711c0ac (diff) |
Always accept TCP connection requests and identify to which neighbor
it belongs only _after_ receiving an Initialization message containing
the information we need. Before an Initialization message is received,
the TCP connection shouldn't be associated with any neighbor/adjacency.
Therefor refactor that part into a own module.
From Renato Westphal
Diffstat (limited to 'usr.sbin/ldpd/labelmapping.c')
-rw-r--r-- | usr.sbin/ldpd/labelmapping.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/ldpd/labelmapping.c b/usr.sbin/ldpd/labelmapping.c index f4fd3566f25..2ed93570578 100644 --- a/usr.sbin/ldpd/labelmapping.c +++ b/usr.sbin/ldpd/labelmapping.c @@ -1,4 +1,4 @@ -/* $OpenBSD: labelmapping.c,v 1.23 2013/06/01 19:42:07 claudio Exp $ */ +/* $OpenBSD: labelmapping.c,v 1.24 2013/06/04 02:34:48 claudio Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -83,7 +83,7 @@ send_labelmapping(struct nbr *nbr) ldp_hdr = ibuf_seek(buf, 0, sizeof(struct ldp_hdr)); ldp_hdr->length = htons(size); - evbuf_enqueue(&nbr->wbuf, buf); + evbuf_enqueue(&nbr->tcp->wbuf, buf); nbr_fsm(nbr, NBR_EVT_PDU_SENT); } @@ -184,7 +184,7 @@ send_labelrequest(struct nbr *nbr) ldp_hdr = ibuf_seek(buf, 0, sizeof(struct ldp_hdr)); ldp_hdr->length = htons(size); - evbuf_enqueue(&nbr->wbuf, buf); + evbuf_enqueue(&nbr->tcp->wbuf, buf); nbr_fsm(nbr, NBR_EVT_PDU_SENT); } @@ -281,7 +281,7 @@ send_labelwithdraw(struct nbr *nbr) ldp_hdr = ibuf_seek(buf, 0, sizeof(struct ldp_hdr)); ldp_hdr->length = htons(size); - evbuf_enqueue(&nbr->wbuf, buf); + evbuf_enqueue(&nbr->tcp->wbuf, buf); nbr_fsm(nbr, NBR_EVT_PDU_SENT); } @@ -414,7 +414,7 @@ send_labelrelease(struct nbr *nbr) ldp_hdr = ibuf_seek(buf, 0, sizeof(struct ldp_hdr)); ldp_hdr->length = htons(size); - evbuf_enqueue(&nbr->wbuf, buf); + evbuf_enqueue(&nbr->tcp->wbuf, buf); nbr_fsm(nbr, NBR_EVT_PDU_SENT); } @@ -525,7 +525,7 @@ send_labelabortreq(struct nbr *nbr) gen_msg_tlv(buf, MSG_TYPE_LABELABORTREQ, size); - evbuf_enqueue(&nbr->wbuf, buf); + evbuf_enqueue(&nbr->tcp->wbuf, buf); nbr_fsm(nbr, NBR_EVT_PDU_SENT); } |