summaryrefslogtreecommitdiff
path: root/usr.sbin/ospf6d
AgeCommit message (Collapse)Author
2010-06-28If there is no next hop but an interface index, create a cloningAlexander Bluhm
route. This happens when we learn from another router that a directly attached link has a prefix for which we have no address configured at the interface. In this case, we should do neighbor discovery to directly reach the hosts with that prefix on the link. ok claudio@
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-12Add a missing ntohs() around hdr.type. This fixes a segfault asAlexander Bluhm
the area of an ASE LSA is NULL. ok claudio@
2010-06-12Fix an obvious use after free. From ospfd.Alexander Bluhm
ok claudio@
2010-06-12The "dispatch_rtmsg no nexthop" error was emitted in wrong casesAlexander Bluhm
and prevented dynamic route redistribution. Fix the logic bug that was introduced during IPv4 to IPv6 conversion. ok claudio@
2010-06-09Only embed the interface scope for link local nexthops. AS-ext LSA haveClaudio Jeker
an optional non link local forwarding address so we need to be a bit more careful here. Problem found and analyzed by Martin Pelikán.
2010-06-09Correctly decode prefixes. Fixes an infinite loop hit when the prefixlen isClaudio Jeker
not devidable by 32. Problem found and identified by Martin Pelikán.
2010-06-08Calculate size of update packet with IPv6 header and reserve spaceAlexander Bluhm
for IPsec. Avoid IPv6 fragments where possible. If a single LSA is too big, put it into a separate packet with up to IPV6_MAXPACKET bytes. This packet may get fragmented by the kernel. ok stsp@
2010-06-03The is no md5 authentication in OSPFv3. Remove some leftovers fromAlexander Bluhm
the ospf6d packet lenght calculation. ok claudio@ stsp@
2010-06-01With IPv6 OSPF a single LSA can get larger than the MTU. As aAlexander Bluhm
workaround it is better to drop this LSA with a log entry instead of sending emtpy update packets in a burst. As link LSAs cannot be split, the propper solution might be IPv6 fragments. See also RFC5340 Section 4.4.3.8 and Appendix A.1. ok stsp@
2010-06-01Add NULL pointer check after calloc.Alexander Bluhm
ok claudio@ stsp@
2010-06-01Fix error message.Alexander Bluhm
ok claudio@ stsp@
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-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-04-27imsg.h does not need sys/tree.h.Nicholas Marriott
ok eric
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@