summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd
AgeCommit message (Collapse)Author
2010-06-10No need to print FEC twice. Remove it in the log function.Claudio Jeker
2010-06-10Signal a neighbor down event to the LDE when the TCP session is closed.Claudio Jeker
The LDE only tracks neighbors with a running sessions, no session no neighbor needed. So do not wait until the neighbor is removed in the engine to signal the LDE since that happens a lot later. Solves a fatal in LDE when restarting a remote ldpd quickly. OK michele
2010-06-09Move the logging of FEC changes to the LDE and print the FEC and labelClaudio Jeker
information. This is more useful. OK michele
2010-06-09More useful warning message.Claudio Jeker
2010-06-07Store all labels in ldpd in host byte order without any additional shifting.Claudio Jeker
Add the necessary ntohl() and shifts in various places and cleanup the byte order mess we had before. michele@ agrees.
2010-06-02MPLSCTL_ENABLE is gone, no need to check for it. There is also no realClaudio Jeker
reason why ldpd needs to check for ip forwarding so remove that check as well. Reminded by phessler@
2010-06-02Start reworking the LDE. Implement a FEC RB tree that can be used for theClaudio Jeker
route table and the per neighbor request and mapping lists. The received and sent mappings are added to the per neighbor RB tree and additionally linked to the route table. This makes lookups, etc. a lot easier. While there flip the neighbor hash list over to a RB tree. OK michele@
2010-05-28Send the IMSG_NEIGHBOR_UP msg when the neighbor is going into operationalClaudio Jeker
status instead upon creation (when the first HELLO is received). The LDE needs only to know about operational neighbors or it may happen that the LDE is sending messages to neighbors that have no session open resulting in a crash because of unitialized structures. OK michele@
2010-05-26Move imsg into libutil and add a man page.Nicholas Marriott
Minor bump for libutil. Previous versions of this diff and man page looked at by various people. "you should just commit" deraadt
2010-05-26Rename some imsg bits to make namespace collisions less likely buf toNicholas Marriott
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE. ok henning gilles claudio jacekm deraadt
2010-05-25Ugh. Remove name2id.c for real now.Claudio Jeker
2010-05-25Remove another leftover from ospfd. ldpd does not have a concept of ext_tagClaudio Jeker
and so there is no need to carry ext_tag and rtlabels around. "Yes! kill kill kill" michele@
2010-05-25Implement the missing label map recv functions and cleanup the other recvClaudio Jeker
functions a bit to make them all look more similar. All but the label req abort message are now parsed and passed to the lde.
2010-05-25Add upcomming IMSG_LABEL_RELEASE, IMSG_LABEL_WITHDRAW and IMSG_LABEL_ABORT.Claudio Jeker
Add missing bits to struct map and restructure/simplify the lde.c imsg code.
2010-05-25Kill a bogus bzero() and introduce an empty lde_check_release().Claudio Jeker
That function will be needed soon.
2010-05-25I removed code in the last commit that is needed. Allocate rbuf now byClaudio Jeker
default or else we bomb on the first read access.
2010-05-24now that we can handle >9 args, put "-D name=value" on one line: it's a bitJason McIntyre
more readable, and fixes a spacing bug we had in smtpd.8;
2010-05-19Remove yet another ospf leftover that is not needed here. This timeClaudio Jeker
neighbor self and all the madness surrounding this amazing concept. LDP is not self aware so there is no need for this. OK michele@
2010-05-19Set RTF_MPLS in rtm_fmask and rtm_flags because ldpd wants to play withClaudio Jeker
the MPLS part of those routes. OK michele@
2010-05-17The host address encoding of FEC was killed in RFC5036 and we're happyClaudio Jeker
about that. OK michele@
2010-05-14Order struct element by size.Claudio Jeker
2010-05-14Do not send notifications directly onto the wire. Decide in the caller howClaudio Jeker
to send the notification. On accept use write() else queue message and try to send the queued messages out via msgbuf_write(). This may still fail but is better then the code beforehands. OK michele@
2010-05-14Use calloc() instead of malloc() to allocate the connection structure. ThisClaudio Jeker
way the memory is zeroed. This is equivalent to the relayd commit by reyk. OK reyk, jsg
2010-05-12Make sure there is a difference in the log of non-fatal and fatalClaudio Jeker
notifications.
2010-05-11sort struct by size and kill some unneeded spaces.Claudio Jeker
2010-05-11Kill IMSG_RECONF_AREA. LDP does not have a concept of areas.Claudio Jeker
2010-05-11No need to do a rt_find() twice.Claudio Jeker
2010-05-01split up a multiple assignment so we aren't casting an lvalue.Jonathan Gray
ok michele@ claudio@
2010-04-29Remove some more ospfd-ism from the interface code. This time removeClaudio Jeker
of most of the IF_TYPE_ special cases and most interface types. Point-to-point and broadcast still present because of find_iface() which needs addtional fixing. OK michele@
2010-04-27imsg.h does not need sys/tree.h.Nicholas Marriott
ok eric
2010-04-15Log recieved notifications in a human understanable way. Makes debuggingClaudio Jeker
a bit easier. OK michele@
2010-04-15Cleanup the interface FSM by removing most of the ospfd specific statesClaudio Jeker
that have nothing to do with LDP. OK michele@
2010-04-15session_shutdown() issues a NBR_EVT_CLOSE_SESSION and therefore aClaudio Jeker
session_close() which does the event_del(&nbr->rev) so no need to do it twice. There is also no need to send two S_SHUTDOWN messages. OK michele@
2010-04-15Fix fd leak in error case.Claudio Jeker
OK michele@
2010-04-15Instead of having three ways of setting fds non-blocking useClaudio Jeker
session_socket_blockmode() everywhere. Additionally make two fatal() distinguishable. OK michele@
2010-04-15struct ldp_hdr has probably the worst possible layout (ending with a singleClaudio Jeker
u_int16_t) and must therefor be __packed or sizeof() returns a to large size and causes some very nasty issues. "embrace __packed" dlg@ OK michele@ While there add new notification status types defined in RFC5036
2010-04-15Even though label withdraw, release, and abort requests are not fullyClaudio Jeker
implemented use a correct return value so that ldpd has a chance to survive when one of those messages are received. OK michele@
2010-04-13When a prefix has a implicit null label associated, force pop operation.Michele Marchetto
This allow us to correcly do penultimate hop popping. From Thomas Habets. Thanks. ok claudio@
2010-04-07Remove XXX comment and just close received fd if calloc() fails.Nicholas Marriott
If this happens the imsg may no longer be usable as there may be queued messages, but this is a) already the case with the code now, and b) would be the case if recvmsg() fails anyway, so we can document that -1 from imsg_read() invalidates the struct imsgbuf. discussed with and ok eric
2010-03-26Never call close(nbr->fd) when the neighbor session was fully established,Claudio Jeker
call session_close(nbr) instead since only that will do all needed cleanup. Still not prefect but at least the lde is no longer eating all CPU when a session times out. OK michele@
2010-03-26event_del() the read event when hitting a read error or when closing theClaudio Jeker
file descriptor. If not done, we will loop forever on this event. OK michele@
2010-03-25Kroute updates from the LDE are per FEC so do the lookup in kroute withClaudio Jeker
prefix/len and nexthop but do not consider the priority. send_rtmsg() needs to use the kroute element and not the one sent from the LDE since that one has no priority set (which is needed). This seems to solve a problem where ldpd modified the wrong routes. OK michele
2010-03-24We need to set the rtm_priority when changing a route so that we do notClaudio Jeker
modify a possible better route instead. A bit more is still needed. OK michele@
2010-03-03Rework the kroute code by stealing some code from ospfd and massaging itClaudio Jeker
a lot more. Main reason for this is to add priority support. Additionally add some additional NO_LABEL fixes. OK michele@
2010-03-01nitpicking, NULL instead of 0 in lde_imsg_compose_ldpe() call.Claudio Jeker
2010-02-25One more substitution of label 0 with NO_LABEL.Michele Marchetto
ok claudio@
2010-02-25Whitespaces cleanup.Michele Marchetto
2010-02-25NO_LABEL (instead of zero) must be used to mean that no labels are associatedMichele Marchetto
with the prefix. ok claudio@
2010-02-25Do not use bufferevent for something that's already covered in the imsgClaudio Jeker
buffer API. This fixes a few possible problems in session_read and does some further cleanup in various places. Wrap msgbuf into evbuf to add libevent functionality and use buf_read to handle the read side of a session. OK michele@ and dlg@ did not see anything evil
2010-02-24sort SEE ALSO;Jason McIntyre