summaryrefslogtreecommitdiff
path: root/usr.sbin/ospf6d/rde.c
AgeCommit message (Collapse)Author
2012-09-17Fix trailing whitespaces.Alexander Bluhm
2011-11-06Add a #include that's currently picked up via another header that'sPhilip Guenthe
violating namespace rules ok claudio@
2011-07-07Rework the distribution of link state and iface FSM state changes.Claudio Jeker
Link state changes are sent from the parent to both childs and iface FSM state changes are sent from the ospfe to the rde.
2011-07-07Just use if_find() to find an interface by ifindex.Claudio Jeker
2011-07-07correct/change some debug and fatal messages.Claudio Jeker
2011-07-07Kill nh_reachable. Link state checking is so easy now that it does notClaudio Jeker
matter anymore to cache this value for ospf6d.
2011-07-04LINK_STATE_IS_UP() cleanup userland part. There is no need to specialClaudio Jeker
case carp(4) interfaces anymore. LINK_STATE_IS_UP() almost always does the right job. OK deraadt@ henning@ This needs a -current kernel or link state may be not reported correctly.
2011-07-04Make sure that passive interfaces (like carp) are added to theClaudio Jeker
intra-area rtr LSA. Diff initialy made by Patrick Coleman but simplified by myself. Tested and OK dlg@
2011-05-05KNFClaudio Jeker
2011-05-02Don't include sys/param.h and reformat some lines.Claudio Jeker
2010-08-22When removing an announced prefix, inherit the metric and ext_tagAlexander Bluhm
from the LSA that is currently in the tree. Based on claudio@'s diff and his fix for ospfd. Additionally originate an LSA with external route tag correctly by writing the AS-external-LSA's bit T into the correct field. ok claudio@
2010-07-09Do not try to originate an intra-area-prefix-lsa if an interfaceAlexander Bluhm
address changes that does not belong to any area. This fixes an ospf6d crash. To not search for the area in orig_intra_lsa_net(), just pass the area as function parameter. ok claudio@
2010-07-06Update the interfaces changes from kroute to rde via imsg. ThisAlexander Bluhm
is needed to orginate correct intra-area-prefix-lsas. ok claudio@ stsp@
2010-07-06Use the static variable narea only where needed for config reload.Alexander Bluhm
The other imessages use the stack variables area and iface. ok claudio@
2010-07-05During network intra-area-prefix-lsa origination, the designatedAlexander Bluhm
router's prefixes were ignored if all other routers on that link had no prefixes. Advertise a intra-area-prefix-lsa with all prefixes for the network if there are any adjacent neighbors on link. ok stsp@
2010-07-01Fix memory leak by adding a missing free(lsa).Alexander Bluhm
ok claudio@
2010-07-01Fix all white space bugs in ospf6d at once. No binary change.Alexander Bluhm
ok claudio@
2010-07-01The prefixes of interface addresses of an ospf link have to beAlexander Bluhm
advertised as link-lsa and intra-area-prefix-lsa when they change dynamically. Handle RTM_NEWADDR and RTM_DELADDR in kroute by sending an imsg to ospfe. Upon this event, originate a new link-lsa in ospfe. In rde a new intra-area-prefix-lsa is generated when a link-lsa appears or goes away. ok claudio@; ok and test stsp@
2010-06-28Store the ifindex into the kroute change imsg. This way we can useAlexander Bluhm
the interface index for writing routes into the kernel. ok claudio@
2010-06-12Fix an obvious use after free. From ospfd.Alexander Bluhm
ok claudio@
2010-06-01Add NULL pointer check after calloc.Alexander Bluhm
ok claudio@ stsp@
2010-06-01Fix error message.Alexander Bluhm
ok claudio@ stsp@
2010-04-16Move a function to a place that is a bit more logical. No functional change.Claudio Jeker
2010-03-01Support for redistributing AS-ext LSA (redistribute static/connected).Claudio Jeker
Appart from multi-area support this is the last big missing piece in ospf6d. ospf6d should now work correctly in single area setups. So please test. "it's always nice to see those #if 0 being killed" stsp@
2010-01-24In orig_intra_lsa_rtr(), don't allocate and free a temporary bufferStefan Sperling
which easily fits on the stack. OK claudio@
2009-12-22Add interface index aka. scope id to struct kroute so that the rde can passClaudio Jeker
this information to kroute and kroute can use that information to fill in the various sin6_scope_id fields.
2009-11-02Add IMSG_CTL_LOG_VERBOSE similar to ospfd it allows to toggle debug logging.Claudio Jeker
henning, sthen, michele like the idea
2009-07-28More fallout from the r1.31 commit. This time PID and the fd got swapped.Claudio Jeker
Again from stsp@
2009-07-28Running 'ospf6ctl show' twice caused ospf6d to fatal. Cause was a missing -Claudio Jeker
when passing -1 as fd to the imsg call. No frogs for eric@ and pyr@ From stsp@
2009-06-06make ospf6ctl/ospf6d imsg-in-a-lib ready too.Eric Faurot
ospf6ctl is already broken in tree (not connected to build). ok pyr@
2009-05-31Remove redundant imsg_event_add calls; ok claudio@Jacek Masiulaniec
2009-05-31libevent handler fix to allow EV_READ and EV_WRITE to be set at the sameClaudio Jeker
time in the callback. Same diff that went into ospfd applied with some fuzz.
2009-04-09Fix a naming inconsistency in struct lsa_intra_prefix (lsid -> ls_id).Stefan Sperling
"consistency is a good thing" jsing@, ok claudio@
2009-03-29As a first step towards SPF tree calculation, prepare for properStefan Sperling
next-hop calculation. In OSPFv3, next-hop IP addresses are always link-local. The kernel will want to know which interface the link-local address belongs to, so we need an ifindex in struct v_nexthop in addition to the IP address. Because we cannot determine a link-local next hop IP address for transit networks, only the outgoing interface will be recorded. Update calc_nexthop_add() according to the above. Also add new helpers calc_nexthop_lladdr() and calc_nexthop_transit_nbr(), to figure out link-local addresses of nexthop neighbours. ok claudio@
2009-03-12lsa_self() did too many things at once, and had too much logicStefan Sperling
buried inside of it that its caller relied on. So split it up as follows: lsa_self() Check whether an LSA is self-originated. lsa_flush() Flush an LSA from the LSDB. lsa_reflood() Prepare an LSA for reflooding (actual reflooding currently requires sending an imsg which must be done by the caller). ok claudio@
2009-03-07Add lsa_find_tree() to allow searching for LSAs in a specific LSA tree.Stefan Sperling
We had code marked XXX searching an LSA tree manually using RB_FIND(), switch it over to lsa_find_tree(). Make lsa_find() use the new function, too, to avoid code duplication. ok claudio@
2009-02-19Use rde_router_id() instead of directly accessing rdeconf->rtr_id.s_addr.Stefan Sperling
"For sure!" claudio@
2009-02-19Enable origination of Intra-Area-Prefix LSAs in rde.Stefan Sperling
New Intra-Area-Prefix LSAs are originated when a neighbour becomes adjacent, or when a neighbour loses adjacency, or when an interface changes state. ok claudio@
2009-02-19Virtually re-implement origination of Intra-Area-Prefix LSAs.Stefan Sperling
We now comply with RFC5340 and move prefixes between the two ref-types of Intra-Area-Prefix LSAs (router and network). In case an LSA ends up having all of its prefixes moved to another one, the LSA is flushed from the LSDB by re-originating with MAX_AGE. (This does not yet work reliably. We end up having LSAs with zero prefixes in the LSDB in some cases. Should not affect SPF calculation, so not much harm done, but will need to be fixed.) This commit just adds the necessary code to do origination, but it is not being called yet. This will be done in a separate commit. "Looks good." claudio@
2009-02-19Sync iface fsm state from ospfe to rde.Stefan Sperling
Also syncs other fields the ospfe is syncing to when getting iface updates from parent process. None of these fields are used by the rde yet, but state will be important soon, for proper origination of Intra-Area-Prefix LSAs. ok claudio@
2009-02-10Fix two obvious copy-paste errors in fatal error messages. We wereStefan Sperling
printing IFINFO while we are actually handling an IFDELETE imsg.
2009-02-03Formatting fixes.Stefan Sperling
2009-01-29Hard-code the Link State ID of Intra-Area-Prefix LSAs referencing NetworkStefan Sperling
LSAs to zero. We were using the interface index, which is not quite right for this type of LSA. This is part of a greater scheme: Intra-Area-Prefix LSAs referencing Router LSAs (not yet implemented) will initially have their Link State ID hard-coded to one. Then, as soon as we implement fragmentation of Intra-Area-Prefix LSAs, Link State IDs for both types of Intra-Area-Prefix LSA will have to be generated dynamically in a non-overlapping fashion. discussed with claudio@
2009-01-29Improve debugging message in orig_intra_lsa_net().Stefan Sperling
Print not just the area, but also the interface to the link the LSA is generated for. ok claudio@
2009-01-28Teach ospf6d to originate Intra-Area-Prefix LSAs, which associate a listStefan Sperling
of IPv6 prefixes with a Network LSA (there's another type of this LSA which associates prefixes with a Router LSA -- this remains to be done). Add what is necessary to allow ospf6ctl to read the new LSA type via IMSG. ok claudio@
2009-01-27Again, no need to double check if neighbor exists.Michele Marchetto
ok stsp@
2009-01-03Since link LSAs live in iface->lsa_tree and not in area->lsa_tree,Stefan Sperling
we had better include LSAs from iface->lsa_tree when sending DB summaries. Fixes initial flood of link LSAs. ok claudio@
2008-12-30First try at originating Link (type-8) LSA. Code is wrong and the initialClaudio Jeker
LSA is lost in lsa_flood. Put this in because it goes in the right direction and ospf6d is work in progress. Add necessary framework so that we can print Link LSA in ospf6ctl. Diff mostly from stsp@ ospf6ctl part by myself
2008-12-28No need to byteswap req_hdr.type as lsa_find() will do that for us.Claudio Jeker
From Stefan Sperling
2008-02-11Correct the output of several error and debug messages.Esben Norby