summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd
AgeCommit message (Collapse)Author
2010-10-14kr_redistribute() needs to be called with the head node of a multipathClaudio Jeker
chain. Fix kroute_insert() and rtmsg_process() to correctly do this. OK bluhm@
2010-10-01Reword a commentClaudio Jeker
2010-09-25When counting the lsa also build the sum of the ls_checksums. This can beClaudio Jeker
used to quickly verify if two LSDBs are in sync. Other systems do the same. OK dlg@
2010-09-02remove trailing spaces and tabs from source code; no binary changesIgor Sobrado
(verified by both sthen@ and me). ok sthen@; "just commit it" claudio@
2010-08-03fix linecount bug with comments spanning multiple linesHenning Brauer
problem reported with the obvious fix for bgpd by Sebastian Benoit <benoit-lists at fb12.de>, also PR 6432 applied to all the others by yours truly. ok theo isn't it amazing how far this parser (and more) spread?
2010-07-19When removing an announced prefix inherit the metric and ext_tag from theClaudio Jeker
LSA that is currently in the tree. Pruning with default metrics is bad since the checksum of the LSA is different and therefor an additional update cycle is needed to convince the other systems. OK bluhm@, sthen@
2010-07-19lsa_refresh() was able to resurect dead LSA resulting in zombie anouncements.Claudio Jeker
Make sure that if the LSA is managed by this router that we force timed-out LSA to stay timed out which causes them to be pruned in the secound round. This problem can show up when not exactly the same LSA is pruned because the checksum is used as tiebreaker resulting in indeterministic selection of which LSA is considered newer. OK bluhm@, sthen@
2010-07-14handle RTM_DESYNC. if the kernel says we're out of sync with the kernelDavid Gwynne
routing table and interface list, do a reload of the kernel state. ive been running this in production for 2 or 3 weeks. tested by sthen@ ok sthen@ claudio@ deraadt@ code written by andrew sallaway at the univeristy of queensland.
2010-07-12Merge duplicate log messages into one log_warn().Alexander Bluhm
ok claudio@
2010-07-09ospfd is a AF_INET only routing daemon so limit the routing socket to thatClaudio Jeker
af. This is possible since this filtering no longer blocks RTM_IFINFO. OK henning@
2010-07-03Fix the naming of interfaces and variables for rdomains and rtablesPhilip Guenthe
and make it possible to bind sockets (including listening sockets!) to rtables and not just rdomains. This changes the name of the system calls, socket option, and ioctl. After building with this you should remove the files /usr/share/man/cat2/[gs]etrdomain.0. Since this removes the existing [gs]etrdomain() system calls, the libc major is bumped. Written by claudio@, criticized^Wcritiqued by me
2010-07-01Fix memory leak by adding a missing free(lsa).Alexander Bluhm
ok claudio@
2010-06-28Fix IFADDRDEL imsg error message.Alexander Bluhm
ok claudio@
2010-06-27fix rtmsg_process to return on an error during processing rather thanDavid Gwynne
continue. fix kr_dispatch_msg so it acts when rtmsg_process fails. from andrew sallaway based on discussion with claudio@ ok claudio@
2010-06-26Use offsetof() instead of writing our own version (...which generatesPhilip Guenthe
warnings from gcc4) os claudio@
2010-06-23127/8 is INADDR_LOOPBACK & IN_CLASSA_NET the kroute code does notClaudio Jeker
automagicaly mask the addresses. While there kill a #ifdef that no longer makes sense since it is the least problem for portable versions.
2010-06-23fetchifs and fetchtable return -1 on error, not !0. in fact, they returnDavid Gwynne
the number of bytes they processed from the kernel on success, so testing against 0 meant that the fib reload code always dropped out early. found by andrew sallaway ok claudio@
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-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-18Spacing.Claudio Jeker
2010-05-17more then -> more than;Jason McIntyre
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-14When merging interfaces after a config reload, the fsm state for interfacesStuart Henderson
is forced into IF_STA_NEW so that if_init() can be called to setup timers etc. When a loopback interface is added to the config, this means there's no way to get to the correct state. Fix by avoiding changing an existing IF_STA_LOOPBACK and forcing loopback interfaces to be passive (otherwise skipping the if_init on an active interface causes problems). ok claudio@
2010-05-13typo: colision->collisionStuart Henderson
2010-05-07When failing to form an adjacency, log the interface name as wellStuart Henderson
as the neighbour. ok claudio@
2010-04-27imsg.h does not need sys/tree.h.Nicholas Marriott
ok eric
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-04-02The rtm_errno check which was moved in the last commit should onlyStuart Henderson
be done for rtmsgs (which have an rtm_errno) and not ifmsgs (which have part of an if_data struct in that location). Fixes problems finding interface addresses at startup. ok claudio@
2010-04-01Minor cleanup figured out while syncing kroute with snmpd's.Claudio Jeker
OK dlg@
2010-03-24options must be sorted.Joerg Goltermann
OK: henning@, claudio@
2010-03-06ospfd/ospf6d man page cleanup:Stefan Sperling
Sync description of the OSPF protocol between ospfd(8) and ospf6d(8). Document current shortcomings -- in particular, document that ospf6d(8) needs manual IPsec setup for security. Clean up various grammatical errors, re-order and re-phrase things a bit to improve readability. Update RFC references. Remove IPv4-specific stuff from ospf6d.conf(5). OK jmc@ claudio@
2010-02-23Fix .Oo .Xo .Oc .Xc mis-nesting by just dropping the .Xo and .Xc which,Ingo Schwarze
in these cases, is useless anyway. Found by and fixing the build with mandoc; still fine with both old and new groff. ok jmc@
2010-02-23fetchtable and the kroute dispatch handlers both parse the same messagesDavid Gwynne
in slightly different ways. this unifies these handlers and cuts fetchtable over to using the generic handler. help from claudio@ and sthen@ ok claudio@
2010-02-22dedup some code a bit. rather than have the same code in fetchifs andDavid Gwynne
dispatch_rtmsg, factor the message handling out. both fetchifs and dispatch_rtmsg get a buffer full of messages and then run it through a parser. now they get their buffers and pass it to rtmsg_process. ok claudio@
2010-02-22remove the original fetchtable code and replace it with the newDavid Gwynne
refetchtable. tested by me and sthen@ ok claudio@
2010-02-21Kill double declaration of control_imsg_relay().Michele Marchetto
From Christiano F. Haesbaert. ok claudio@
2010-02-19oops, remove dead code.David Gwynne
2010-02-19implement ospfctl fib reload.David Gwynne
this tells the daemon to resync the kernels list of interfaces and routes with the daemons list. this is very useful if the routing socket overflows and you want to sync things up again. lots and lots of help from claudio@ ok claudio@
2010-02-16Pick up RTM_DELADDR and issue an internal IFADDRDEL message to the ospfe toClaudio Jeker
inform about the interface address change. If this is an active interface it will be downed. A ospfctl reload is needed to fetch the new/changed IP if one got set. OK dlg@, sthen@
2010-02-16When taking an interface down just try to do the cleanup. In cases whereClaudio Jeker
the interface was removed or when the address changed leaving the multicast groups will fail because that already happend. Fix if_leave_group() to remove the refcount before doing the ioctl() so that the reference is correctly removed. OK dlg@, sthen@
2010-02-16Only merge interfaces that have the same address and netmask. Fixes a bugClaudio Jeker
with reloads when running ospfd on multiple aliases on the same interface. Is also needed to handle interface address changes in a much better way. OK dlg@, sthen@
2010-02-16Clear the DR and BDR addresses in nbr_act_delete(), makes the electionClaudio Jeker
process more reliable after interface flaps. Especially when the router-id changed at the same time. OK dlg@, sthen@
2010-02-16Lets violate the RFC once more. Change the way we map hello packets toClaudio Jeker
neighbors from using the source IP on broadcast interfaces to using the router-id all the time. The interface lookup will already check for matching subnets so there is no conflict possible. This makes ospfd finally grok router-id changes without freaking out. Additionally whinge when an other router is using the same router-id instead of failing in a very horrible way. OK sthen@, dlg@
2010-02-16Don't log the same thing twice. From a much bigger diff.Claudio Jeker
OK dlg@, sthen@
2010-02-16implement support for fast hello packets.David Gwynne
if route-dead-time is set to "minimal" (rather than a number of seconds), the dead time is set to 1 second and hellos are sent at the interval specified by fast-hello-interval in msecs. this is non standard wrt to the ospf rfc, but it does interoperate with at least one other router vendor. this allows much better responsiveness to l3 topology changes than the standard intervals allow. if i yank a cable to one of my upstreams, the routes adjust in a second rather than the default of 40 i was running with before. the users dont even notice something changed. developed while working with joshua atterbury. ok claudio@ as part of a larger diff. dedicated to zan rowe who thinks she is a bigger nerd than me.
2010-02-16the minimal spf-holdtime and spf-delay is 10 msec, not 50.David Gwynne
pointed out by claudio@ before, somehow it snuck back in.
2010-02-16allow spf-delay and spf-holdtime to be specified in msec so ospfd canDavid Gwynne
better respond to rapid topology changes. developed while working with joshua atterbury ok claudio@ as part of a larger diff.
2010-02-01Fix logic error (&& vs. ||), found while looking for inspiration for smtpdJacek Masiulaniec
state machine needed by the features that are coming along. ok claudio@
2009-12-08porcesses -> processesJonathan Gray