summaryrefslogtreecommitdiff
path: root/sys/net/rtsock.c
AgeCommit message (Collapse)Author
2004-09-16handle route labels on RTM_CHANGE, ok mcbride, prodded my markus some time agoHenning Brauer
2004-08-03introduce route labels, allowing for up to 32 bytes of info to be attachedHenning Brauer
to a route. the label is sent over the routing socket wrapped into a new struct sockaddr_rtlabel, allowing for handling it like any other sockaddr. struct rtentry only contains a (16 bit) label-ID, with the actual labels kept outside the routing table. ID allocator code inspired by my own code for altq and pf tags. mostly hacked at the c2k4 hackathon, markus ok
2004-06-24KNF, cleanup, readability fixes... this hurtHenning Brauer
ok itojun claudio
2004-06-22Pull the plug on source-based routing until remaining bugs are eradicated.Cedric Berger
No need to reconfig kernel or rebuild userland stuff. requested deraadt@, help beck@
2004-06-06extend routing table to be able to match and route packets based onCedric Berger
their *source* IP address in addition to their destination address. routing table "destination" now contains a "struct sockaddr_rtin" for IPv4 instead of a "struct sockaddr_in". the routing socket has been extended in a backward-compatible way. todo: PMTU enhancements, IPv6. ok deraadt@ mcbride@
2004-05-12Rework a block readded by the multipath commit that should ensure thatClaudio Jeker
RTM_CHANGE/LOCK only work on perfect matching routes. ppp and bgpd got broken because of this. Most of the code in the "grotty" block is already done by rn_lookup() only host routes need some special treatment. OK cedric@
2004-05-04The tcp specific routing metrics are almost never used so reduce the routingClaudio Jeker
table from these metrics. struct rt_msghdr used by the routing socket is not affected and so most userland apps don't need to be changed. some man page polishing by jmc@ OK henning@ markus@ theo@
2004-04-25radix tree with multipath support. from kame. deraadt okJun-ichiro itojun Hagino
user visible changes: - you can add multiple routes with same key (route add A B then route add A C) - you have to specify gateway address if there are multiple entries on the table (route delete A B, instead of route delete A) kernel change: - radix_node_head has an extra entry - rnh_deladdr takes extra argument TODO: - actually take advantage of multipath (rtalloc -> rtalloc_mpath)
2004-01-15add a RTM_IFANNOUNCE message; from netbsd; ok itojun, henningMarkus Friedl
2004-01-03put an mi wrapper around stdarg.h/varargs.h. gcc3 moved stdarg/varargs macrosMarc Espie
to built-ins, so eventually we will have one version of these files. Special adjustments for the kernel to cope: machine/stdarg.h -> sys/stdarg.h and machine/ansi.h needs to have a _BSD_VA_LIST_ for syslog* prototypes. okay millert@, drahn@, miod@.
2003-12-10de-register. deraadt okJun-ichiro itojun Hagino
2003-08-15change arguments to suser. suser now takes the process, and a flagsTed Unangst
argument. old cred only calls user suser_ucred. this will allow future work to more flexibly implement the idea of a root process. looks like something i saw in freebsd, but a little different. use of suser_ucred vs suser in file system code should be looked at again, for the moment semantics remain unchanged. review and input from art@ testing and further review miod@
2003-08-14m_copyback()'s 4th arg is const void *, nuke (caddr_t) casts.Jason Wright
2003-07-05backout 1.29; problem reported by Rukh w/ userland ppp.Jun-ichiro itojun Hagino
2003-06-24recover code that requires exact match on rtm_change/lock (lost in netbsd 1.16).Jun-ichiro itojun Hagino
without it "route change X" would change less-specific route by mistake. reported by jinmei@kame, markus ok
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-04-23Move m_copyback() to uipc_mbuf where it makes some kinda sense; ok dhartmeiJason Wright
2003-02-16KNFTheo de Raadt
2002-12-31don't overrun user-supplied buffer. from jinmei@kame, deraadt okJun-ichiro itojun Hagino
2002-07-17Don't dereference freed memory.Artur Grabowski
2002-07-03fix a null deref in sysctl_iflist()Michael Shalayeff
2002-07-02inital -> initialNathan Binkert
2002-03-15Kill #if __STDC__ used to do K&R vs. ANSI varargs/stdarg; just do thingsTodd C. Miller
the ANSI way.
2002-03-14First round of __P removal in sysTodd C. Miller
2001-12-10use queue.h macros for TAILQ operationsJason Wright
2001-11-06Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.Miod Vallat
(Look ma, I might have broken the tree)
2001-09-20occured->occurredMike Pechkin
idea from deraadt@ via NetBSD millert@ ok
2001-07-21repair validation on RTAX_GENMASK insertion. has been broken since 44bsd.Jun-ichiro itojun Hagino
(freebsd3 has a fix since 1999, but has insufficient validation on sa_len)
2001-06-04adjust routing socket message (kernel -> user) to the right size.Jun-ichiro itojun Hagino
with old code we may see junk at the end. sync with kame, 4.4BSD bug.
2001-05-16No need to check M_WAIT/M_WAITOK malloc return values. (art@ ok)Hakan Olsson
2001-01-19pull post-4.4BSD change to sys/net/route.c from BSD/OS 4.2 (UCB copyrighted).Jun-ichiro itojun Hagino
have sys/net/route.c:rtrequest1(), which takes rt_addrinfo * as the argument. pass rt_addrinfo all the way down to rtrequest, and ifa->ifa_rtrequest. 3rd arg of ifa->ifa_rtrequest is now rt_addrinfo * instead of sockaddr * (almost noone is using it anyways). benefit: the follwoing command now works. previously we need two route(8) invocations, "add" then "change". # route add -inet6 default ::1 -ifp gif0 remove unsafe typecast in rtrequest(), from rtentry * to sockaddr *. it was introduced by 4.3BSD-reno and never corrected. XXX is eon_rtrequest() change correct regarding to 3rd arg? eon_rtrequest() and rtrequest() were incorrect since 4.3BSD-reno, so i do not have correct answer in the source code. someone with more clue about netiso-over-ip, please help.
2000-12-13have add set locks, too. okay itojun@Niels Provos
2000-03-12don't touch root radix node on RTM_*. this can panic system fromJun-ichiro itojun Hagino
non-root userland process, under certain routing table setup. http://orange.kame.net/dev/query-pr.cgi?pr=217
2000-02-17backout incomplete hack from KAME codebase (originally from bbn).Jun-ichiro itojun Hagino
the hack tries to respect ifa or ifp passed to RTM_ADD. However, the change broke certain link-layers. They include: - midway ethernet card (en*), which uses sockaddr_dl in gateway portion to pass PVC information. with the patch, the gateway portion will be overwritten by empty sockaddr_dl and PVC initialization will fail. - IPv6, which can't set static ND table with the patch (ndp -s) with the similar reason. There may be improved hack coming soon, hope the new one does not break others.
2000-02-07make more check about mbuf len before rolling message for routing header.Jun-ichiro itojun Hagino
1999-12-08bring in KAME IPv6 code, dated 19991208.Jun-ichiro itojun Hagino
replaces NRL IPv6 layer. reuses NRL pcb layer. no IPsec-on-v6 support. see sys/netinet6/{TODO,IMPLEMENTATION} for more details. GENERIC configuration should work fine as before. GENERIC.v6 works fine as well, but you'll need KAME userland tools to play with IPv6 (will be bringed into soon).
1998-08-24Don't deref NULL.Jason Downs
1998-05-18first step to the setsockopt/getsockopt interface as described inNiels Provos
draft-mcdonald-simple-ipsec-api, kernel notifies (EMT_REQUESTSA) signal userland key management applications when security services are requested. this is only for outgoing connections at the moment, incoming packets are not yet checked against the selected socket policy.
1997-12-15fix for route change crash; from freebsdTheo de Raadt
1997-12-12permit non-root to use RTM_GET, but no other calls; netbsdTheo de Raadt
1996-04-21partial sync with netbsd 960418, more to comeTheo de Raadt
1996-03-03From NetBSD: 960217 mergeNiklas Hallqvist
1995-10-18initial import of NetBSD treeTheo de Raadt