summaryrefslogtreecommitdiff
path: root/usr.sbin/ospf6d
AgeCommit message (Collapse)Author
2010-04-16Move a function to a place that is a bit more logical. No functional change.Claudio Jeker
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-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-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-03-01Implement lsa_find_lsid(), a function that searches the LSDB for a LSAClaudio Jeker
specified by type, adv_rtr and an LSA to compare against. This is needed to find either a free LS ID or the previously assigned LS ID of an AS-ext LSA. "looks like you know what you're doing" stsp@
2010-03-01Add routing calculation code for AS-ext LSA and Inter-Area LSA but theClaudio Jeker
latter are not realy tested. AS-ext LSA are now correctly added to the RIB. "looks like you know what you're doing" stsp@
2010-02-26Swap order of RB tree sorting from type, ls_id, adv_rtr to type, adv_rtr,Claudio Jeker
ls_id. This is needed since sometimes the ls_id is not known and we need to walk part of the tree.
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-23This is a total dejavu of bgpd/kroute.c 1.165. Because IPv6 fucked up andClaudio Jeker
created a badly sized struct sockaddr_in6 we need to add some magic pading on 64bit archs. Code stolen from bgpd after a painful afternoon of bug hunting, head scratching and violent cursing. Now ospf6d works on 64bit archs.
2010-02-23Oups, forgot this file in last commit. Bit definitions for AS-ext LSA neededClaudio Jeker
by lsa_asext_check().
2010-02-23Implement lsa_asext_check() to verify that type 5 LSA are correctly encoded.Claudio Jeker
Diff originally from stsp@, some minor modifications by me. First step to support type 5 LSA.
2010-02-22Treat multiple Router-LSAs originated by the same router as anStefan Sperling
aggregate, as mandated by RFC5340. OK claudio@
2010-02-21Kill double declaration of control_imsg_relay().Michele Marchetto
From Christiano F. Haesbaert. ok claudio@
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@
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-23Loopback interface don't have link local addresses so use the real IPv6Claudio Jeker
address for so that the device is no considered unnumbered.
2009-12-22Crap. Remove debug code that I did not plan to commit.Claudio Jeker
2009-12-22Holy inconsitancy Batman! While it is impossible to use embeded scope idsClaudio Jeker
in almost all sockaddr_in6 addresses it is required for the nexthop and sin6_scope_id is actually ignored there. This needs to be fixed but my quota of IPv6 insanity is already used for today. Workaround for now. My simple testsetup is now actually able to install the first ospf6d learned routes in the kernel. Weeee!
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-12-22Link local addressing strikes again. Include ifindex in all nexthopClaudio Jeker
definitions so that we have a chance to build a correct nexthop. Insane that a struct in6_addr is unable to fully specify an IPv6 address. kroute.c still needs fixing but now the rib is starting to make sense.
2009-12-22Implement log_in6addr_scope() yet another function doing the same thingClaudio Jeker
again but different because of link local addressing.
2009-12-22Use correct interface id. iface_id is our ifindex, nbr_iface_id is theClaudio Jeker
interface id of the remote side. Found the hard way.
2009-12-22Give calc_nexthop_lladdr() a chance to find the correct link local address.Claudio Jeker
We need to pass our ifindex so that we can find the Link-LSA that has the link local address stored for that router. Don't we all like IPv6 link local addresses and their insanity.
2009-12-21Another AF_INET that should be an AF_INET6.Claudio Jeker
2009-12-21Doh! It helps to load the IPv6 routing table into kroute instead of IPv4.Claudio Jeker
2009-12-08porcesses -> processesJonathan Gray
2009-12-02log_warn() consistency.Michael Knudsen
`OK' claudio
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-10-22write UNIX-domain in a more consistent way; while here, replace aIgor Sobrado
few remaining ".Tn UNIX" macros with ".Ux" ones. pointed out by ratchov@, thanks! ok jmc@
2009-10-22use the UNIX-related macros (.At and .Ux) where appropriate.Igor Sobrado
ok jmc@
2009-09-30Bring in sync with the bgpd version of carp.c. This fixes a memory leakClaudio Jeker
in an error path.
2009-09-30carp_demote_ioctl() can handle more then +/-1 steps so there is no need toClaudio Jeker
loop in the shutdown case. OK henning@
2009-09-20if_new() would treat the new interface as a virtual link if the ifnameStefan Sperling
parameter was NULL. But it's easy enough to make ifname != NULL by accident, e.g. by passing a zeroed or even uninitialised array. This function should accept a 'virtual' flag of some kind instead. Since we don't even support virtual links yet, change the check to "if (virtual)", #if 0 the check, and code that depends on it (including a file-scope variable), and add comments marking this as TODO. ok claudio, who requested #if 0 instead of deletion.
2009-09-20In kif_update(), the ifname array could be used uninitialised if theStefan Sperling
caller passed NULL for the sdl parameter. ok claudio@
2009-09-15Enclose repeated buffer draining code in a new msgbuf_drain()Jacek Masiulaniec
function, which is additionally exported for use by others. It will be needed by smtpd's SSL module when the SMTP client code is changed to replace libevent's evbuffers with our msgbuf_* API. ok gilles@ henning@ guenther@ eric@
2009-08-08Make imsg_clear close and free any fds in the received fd queue as well asNicholas Marriott
freeing the msgbuf. While here also remove an unnecessary while loop. ok eric pyr
2009-07-28Install interface addresses of other routers (LA bit set or 128 prefixlen)Claudio Jeker
as router type and not as a network. From stsp@
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-07-23make buf_write() behave like msgbuf_write(): send out only theEric Faurot
bytes that were filled, not the whole buffer. ok pyr@ gilles@
2009-06-08revert this change by eric@:David Gwynne
Make the imsg protocol network-safe. it might be network safe, but half the imsg based daemons on my firewalls dont run anymore.
2009-06-07Change the way fds passed over a socket are retreived on the receiving side.Eric Faurot
Currently the receiver fetches an imsg via imsg_get() and if he expects an fd, he then calls imsg_get_fd() to fetch the next fd queued on the imsgbuf from which the imsg came. This changes hides the fd queueing mechanism to the API user. When closing an imsg with an fd, the message is flagged so that the receiving end knows it must dequeue the fd in imsg_get() and return it with the imsg structure. This way there is no (less) possible screw up from imsg_get_fd() not being called directly after imsg_get() by the user. The retreived imsg is self-contained. ok pyr@, "I like that" henning@
2009-06-07Make the imsg protocol network-safe.Eric Faurot
ok pyr@
2009-06-06change the imsg header fields a bit to prepare for upcoming changes.Eric Faurot
add a flag field, use u_int32_t for pid_t and extend type to 32 bits for padding. ok pyr@
2009-06-06Get ready for including imsg.h from a lib, when it comes along.Pierre-Yves Ritschard
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-06-05rtm->rtm_hdrlen conversionChris Cappuccio
ok claudio@, henning@
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-09Update rt_calc() for OSPFv3. The Routing Information Base is beingStefan Sperling
populated. Intra-area routes only for now. "I see no obvious issues. Should go in so you can move forward" claudio@