summaryrefslogtreecommitdiffstats
path: root/sys/net/rtsock.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Import MPLS (Multi Protocol Label Switching)norby2008-04-231-1/+9
| | | | | | | | | | | | | MPLS support partly based on the (abandoned?) AYAME project. Basic LSR (Label Switch Router) functionality is present, but not fully functional yet. It is currently possible to insert entries in the LIB (Label Information Base) with route(8), but setting the operation type is not supported yet. Imported to allow more people to work on this in the coming weeks. ok claudio@ laurent@ dlg@
* malloc sweep:henning2007-09-151-3/+2
| | | | | | | -remove useless casts -MALLOC/FREE -> malloc/free -use M_ZERO where appropriate instead of seperate bzero feedback & ok krw, hshoexer
* Only clear the message header if it is called from a sysctl walk. Thisclaudio2007-09-091-2/+2
| | | | unbreaks RTM_GET. Problem reported by fkr@
* Clear the message header (and only the message header) in rt_msg2.claudio2007-09-081-5/+4
| | | | | | | | By doing so we ensure that all the memory is initialised and we no longer have to ensure that none of the structure elements is forgotten in sysctl_iflist() and sysctl_dumpentry(). This solves the route flush issues seen by aanriot@ OK henning@
* Check if rtm_hdrlen is smaller then the passed message or it would be possibleclaudio2007-09-071-1/+8
| | | | | | | to access uninitialised memory. Set dst to 0 on error, the error path tries to access dst but dst is inited later down the code. This fixes a kernel panic seen by aanriot@ OK henning@
* Bump RTM_VERSION to 4 and start a new aera of routing in OpenBSD :)claudio2007-09-031-33/+191
| | | | | | | | | Changes include 64bit counters instead of u_long, routing table id in the header of most messages, reserved routing priority field, added a hdrlen field to skip over the header so that binary compatibility becomes easier. A minimal backward support for old binaries is included to ease upgrades but don't expect anything more than ifconfig, route and dhclient to correctly work. OK henning@ mglocker@
* Consistently spell FALLTHROUGH to appease lint.jsg2007-02-141-2/+2
| | | | ok kettenis@ cloder@ tom@ henning@
* support passing the desired routing table ID via the sysctl interfacehenning2006-06-161-3/+11
| | | | | (NET_RT_DUMP & friends) too. keep supporting the old form (and imply id 0) of course. claudio ok
* pass the routing table ID over the routing socket, so we can start tohenning2006-06-161-2/+16
| | | | | | manipulate alternate tables from userland. new tables are created implicitely when an RTM_ADD for that table is seen. ok norby claudio hshoexer
* adjust functions dealing with the routing table to take a table ID ashenning2006-06-161-8/+9
| | | | | | parameter so they can work on alternate tables. table 0 hardcoded for many callers yet, that will be adapted step by step. input + ok claudio norby hshoexer
* Export the route labels via sysctl interface not only via RTM_GET.claudio2006-05-301-1/+15
| | | | OK henning@ norby@
* Routes announced via rt_missmsg() do not have rtm_index set. While in mostclaudio2006-04-221-2/+5
| | | | | | cases harmless it is used by the IPv6 code. The result is that bgpd is unable to assigning link local addresses to the correct interface. OK henning@ Fix for PR 5063.
* Add sysctl to retrieve the routing table statisitcs. Will be used by netstatclaudio2006-03-311-1/+8
| | | | instead of kvm access. OK henning@
* In sysctl_dumpentry() pass the rt_refcnt by overloading rmx_rttvar.claudio2006-03-301-1/+2
| | | | | This new rmx_refcnt can be used by route(8) to produce the same output as netstat(1). OK henning@
* Spelling in comment.claudio2006-03-301-2/+2
|
* prevent anything outside rote.c from accessing the routing table headshenning2006-03-221-4/+4
| | | | | | | | directly. rather provide a rt_lookup function for regular lookups, and a rt_gettable for those that need access to the head for some reason. the latter cases should be revisted later probably so that nothing outside the routing core code accesses the heads at all... tested claudio jolan me, ok claudio markus
* Until now it was only possible to unset the RTF_JUMBO flag on a RTM_CHANGEclaudio2006-02-231-4/+5
| | | | | | | | | request. Extend the "hack" to include more flags (RTF_PROTO[123] flags, RTF_BLACKHOLE, RTF_REJECT and RTF_STATIC). Because rtm_use is "abused" -- rtm_use was replaced long time ago with rtm_rmx->rmx_pksent -- it is now forced to 0 in RTM_GET requests and sysctl_dumpentry(). This is done to prevent false changes because of a reused RTM_GET message. OK henning@, mcbride@, makes sense markus@
* Set rtm_index to the correct interface index for RTM_ADD and RTM_CHANGE.claudio2006-02-021-1/+3
| | | | | bgpd and ospfd use this information to track the availability of a route. Discussed with dlg@, OK henning@
* something in the eurobsdcon route-a-thon broke my simple home networkjolan2005-11-291-6/+4
| | | | | | | | | | | | | | router so back out the routing stuff to pre-eurobsdcon where my machine doesn't crash immediately. i am happy to test diffs and report success/failures but i am not happy to have instantaneous crashes when i reboot with a new kernel that was compiled from pristine sources. if you are going to be an elitist asshole then you could at least make sure your code works. ok and "be crass towards them" deraadt@
* repair builds. ramdisk kernels forgotten about again.deraadt2005-11-271-1/+3
|
* don't let anything outside route.c access the routing table heads directly,henning2005-11-271-4/+4
| | | | | | but go through a provided wrapper. also provide rt_lookup() instead of doing the lookup manually in many places. ryan ok
* kill some leftover bits from netns and iso routinghenning2005-06-081-9/+1
|
* introduce a default "external" interface group, containing the interface(s)henning2005-06-071-1/+2
| | | | | | | | | the the default route(s) point to. handles IPv4 and IPv6 as well as multipath routes. follows default route changes, of course. eases writing pf rulesets especially on laptops etc. that use different interfaces depending on the environment (wired, wireless, ...) ok theo ryan
* Use rtm_fmask instead of rtm_use.mcbride2005-05-271-3/+4
| | | | ok marius@ claudio@
* Allow us to clear the RTM_JUMBO flag as well as set it.mcbride2005-05-271-2/+2
| | | | Reported by Cedric Berger
* Experimental support for opportunitic use of jumbograms where only some hostsmcbride2005-05-271-1/+7
| | | | | | | | | | | | | | on the local network support them. This adds a new socket option, SO_JUMBO, and a new route flag, RTF_JUMBO. If _both_ the socket option is set and the route for the host has RTF_JUMBO set, ip_output will fragment the packet to the largest possible size for the link, ignoring the card's MTU. The semantics of this feature will be evolving rapidly; talk to us if you intend to use it. ok deraadt@ marius@
* handle route labels on RTM_CHANGE, ok mcbride, prodded my markus some time agohenning2004-09-161-1/+8
|
* introduce route labels, allowing for up to 32 bytes of info to be attachedhenning2004-08-031-1/+15
| | | | | | | | | | 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
* KNF, cleanup, readability fixes... this hurthenning2004-06-241-214/+195
| | | | ok itojun claudio
* Pull the plug on source-based routing until remaining bugs are eradicated.cedric2004-06-221-6/+1
| | | | | No need to reconfig kernel or rebuild userland stuff. requested deraadt@, help beck@
* extend routing table to be able to match and route packets based oncedric2004-06-061-1/+6
| | | | | | | | 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@
* Rework a block readded by the multipath commit that should ensure thatclaudio2004-05-121-24/+19
| | | | | | | 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@
* The tcp specific routing metrics are almost never used so reduce the routingclaudio2004-05-041-10/+19
| | | | | | | 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@
* radix tree with multipath support. from kame. deraadt okitojun2004-04-251-1/+34
| | | | | | | | | | | | | 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)
* add a RTM_IFANNOUNCE message; from netbsd; ok itojun, henningmarkus2004-01-151-1/+32
|
* put an mi wrapper around stdarg.h/varargs.h. gcc3 moved stdarg/varargs macrosespie2004-01-031-2/+2
| | | | | | | 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@.
* de-register. deraadt okitojun2003-12-101-43/+43
|
* change arguments to suser. suser now takes the process, and a flagstedu2003-08-151-3/+2
| | | | | | | | | 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@
* m_copyback()'s 4th arg is const void *, nuke (caddr_t) casts.jason2003-08-141-3/+3
|
* backout 1.29; problem reported by Rukh w/ userland ppp.itojun2003-07-051-17/+1
|
* recover code that requires exact match on rtm_change/lock (lost in netbsd 1.16).itojun2003-06-241-1/+17
| | | | | without it "route change X" would change less-specific route by mistake. reported by jinmei@kame, markus ok
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Move m_copyback() to uipc_mbuf where it makes some kinda sense; ok dhartmeijason2003-04-231-55/+1
|
* KNFderaadt2003-02-161-2/+2
|
* don't overrun user-supplied buffer. from jinmei@kame, deraadt okitojun2002-12-311-4/+4
|
* Don't dereference freed memory.art2002-07-171-5/+5
|
* fix a null deref in sysctl_iflist()mickey2002-07-031-1/+3
|
* inital -> initialnate2002-07-021-2/+2
|
* Kill #if __STDC__ used to do K&R vs. ANSI varargs/stdarg; just do thingsmillert2002-03-151-7/+1
| | | | the ANSI way.
* First round of __P removal in sysmillert2002-03-141-5/+5
|