summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_gre.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* update the gre driver.dlg2018-02-071-252/+2
| | | | | | | | | | | the main new feature is gre keys, supported by the vnetid ioctls. this also adds support for gre over ipv6, the use of hfsc, and allows tx mitigation in the future. this diff removes keepalive support, but i promised claudio@ and patrick@ i would put it back after this goes in. ok claudio@
* split mobileip(4) out from the gre(4) driver.dlg2018-02-071-111/+1
| | | | | | | | having mobileip in gre makes it hard to cut gre up. the current mobileip code is also broken, so this is def and improvement. it also makes it easy to disable and remove mobileip in the future. ok claudio@ henning@
* make mpls_input take a struct ifnet *ifp argument.dlg2018-01-091-2/+2
| | | | | | | | | | | this makes it like all our other protocol family input functions. mpls_input always looks up the interface the mbuf was received on, but it's always called by code that already has a reference to that interface anyway. the result of this is a few less if_get/if_put calls. ok mpi@ bluhm@ visa@ claudio@
* Sprinkle some NET_ASSERT_LOCKED(), const and co to prepare runningmpi2017-11-201-1/+2
| | | | | | pr_input handlers without KERNEL_LOCK(). ok visa@
* Reduces the scope of the NET_LOCK() in sysctl(2) path.mpi2017-10-091-5/+18
| | | | | | Exposes per-CPU counters to real parrallelism. ok visa@, bluhm@, jca@
* Convert hand rolled sockaddr checks to the nam2sin functions.bluhm2017-08-151-4/+2
| | | | | | Especially in tcp_usrreq() connect detect the correct address family based on the inp_flags instead of the sa_family user input. OK mpi@
* Introduce ipv{4,6}_input(), two wrappers around IP queues.mpi2017-05-301-7/+16
| | | | | | | This will help transitionning to an un-KERNEL_LOCK()ed IP forwarding path. Disucssed with bluhm@, ok claudio@
* If m is not a continuous mbuf cluster, m_pullup() in pr_input maybluhm2017-05-041-3/+3
| | | | | | | change the pointer. Then *mp keeps the invalid pointer and it might be used. Fix the potential use after free and also reset *mp in other places to have less dangling pointers to freed mbufs. OK mpi@ mikeb@
* Pass down the address family through the pr_input calls. Thisbluhm2017-04-141-4/+4
| | | | | allows to simplify code used for both IPv4 and IPv6. OK mikeb@ deraadt@
* Change the IPv4 pr_input function to the way IPv6 is implemented,bluhm2017-01-291-13/+18
| | | | | | | to get rid of struct ip6protosw and some wrapper functions. It is more consistent to have less different structures. The divert_input functions cannot be called anyway, so remove them. OK visa@ mpi@
* Since raw_input() and route_input() are gone from pr_input, we canbluhm2017-01-251-20/+9
| | | | | | make the variable parameters of the protocol input functions fixed. Also add the proto to make it similar to IPv6. OK mpi@ guenther@ millert@
* Remove some recursives splsoftnet().mpi2017-01-031-4/+1
| | | | ok visa@, mikeb@
* - putting back KASSERT(), which I've backed out on Jan 31sashan2016-03-041-1/+5
| | | | | | | | | We don't expect inbound packets to come to PF with statekey attached. - I've also found missing call to pf_pkt_addr_changed() at various places, which needs to get fixed to prevent KASSERT() from firing. OK mpi@, sthen@
* Rework the MPLS handling. Remove the lookup loops since nothing is usingclaudio2015-12-021-2/+2
| | | | | | | | | them and they make everything so much harder with no gain. Remove the ifp argument from mpls_input since it is not needed. On the input side the lookup side is modified a bit when it comes to BOS handling. Tested in a L3VPN setup with ldpd and bgpd. Commiting now so we can move on with cleaning up rt_ifp usage. If this breaks L2VPN I will fix it once reported. OK mpi@
* Don't use mpls_input() as input handler anymore and instead call itrzalamena2015-07-291-14/+3
| | | | | | directly. Also protect non mp-safe functions while at it. ok mpi@.
* Kill NETISR_MPLS, from now on we will use interface input handlers to dealrzalamena2015-07-201-4/+14
| | | | | | with MPLS packets. ok mpi@, claudio@
* Store a unique ID, an interface index, rather than a pointer to thempi2015-06-161-3/+3
| | | | | | | | | | | | | | | receiving interface in the packet header of every mbuf. The interface pointer should now be retrieved when necessary with if_get(). If a NULL pointer is returned by if_get(), the interface has probably been destroy/removed and the mbuf should be freed. Such mechanism will simplify garbage collection of mbufs and limit problems with dangling ifp pointers. Tested by jmatthew@ and krw@, discussed with many. ok mikeb@, bluhm@, dlg@
* replace the use of ifqueues for most input queues serviced by netisrdlg2015-04-101-15/+5
| | | | | | | | | | | | | | | | | with niqueues. this change is so big because there's a lot of code that takes pointers to different input queues (eg, ether_input picks between ipv4, ipv6, pppoe, arp, and mpls input queues) and falls through to code to enqueue packets against the pointer. if i changed only one of the input queues id have to add sepearate code paths, one for ifqueues and one for niqueues in each of these places by flipping all these input queues at once i can keep the currently common code common. testing by mpi@ sthen@ and rafael zalamena ok mpi@ sthen@ claudio@ henning@
* "handle" wccp2 packets if net.inet.gre.wccp is set to 2 by truncatingmcbride2015-03-181-2/+10
| | | | | | | skipping the wccp 2 header. Tested with Cisco ASA. "looks correct" claudio ok yasuoka
* unifdef INET in net code as a precursor to removing the pretend option.tedu2014-12-191-5/+1
| | | | | long live the one true internet. ok henning mikeb
* remove uneeded proc.h includesjsg2014-09-141-2/+1
| | | | ok mpi@ kspillner@
* Fewer <netinet/in_systm.h> !mpi2014-07-221-2/+1
|
* "struct pkthdr" holds a routing table ID, not a routing domain one.mpi2014-04-141-3/+3
| | | | | | | | | | | | | | Avoid the confusion by using an appropriate name for the variable. Note that since routing domain IDs are a subset of the set of routing table IDs, the following idiom is correct: rtableid = rdomain But to get the routing domain ID corresponding to a given routing table ID, you must call rtable_l2(9). claudio@ likes it, ok mikeb@
* bcopy -> memcpy. reviewed with one fix from matthewtedu2013-12-311-2/+2
|
* Remove the number of in6_var.h inclusions by moving some functions andmpi2013-10-241-5/+1
| | | | | | global variables to in6.h. ok deraadt@
* Remove the number of in_var.h inclusions by moving some functions andmpi2013-10-231-2/+1
| | | | | | global variables to in.h. ok mikeb@, deraadt@
* The header file netinet/in_var.h included netinet6/in6_var.h. Thisbluhm2013-10-171-1/+5
| | | | | | | created a bunch of useless dependencies. Remove this implicit inclusion and do an explicit #include <netinet6/in6_var.h> when it is needed. OK mpi@ henning@
* begone, fucking rotten appletalk shit. ok roomhenning2011-07-091-14/+1
|
* Include PIPEX in kernel by default. And add new sysctl variableyasuoka2011-07-081-7/+7
| | | | | | | | `net.pipex.enable' to enable PIPEX. By default, pipex is disabled and it will not process packets from wire. Update man pages and update HOWTO_PIPEX_NPPPD.txt for testers. discussed with dlg@, ok deraadt@ mcbride@ claudio@
* ansifydhill2011-07-051-22/+7
| | | | ok claudio@
* fix typos in commentsthen2011-05-311-3/+3
|
* wrap long line. correct indent. delete a useless comment.yasuoka2010-09-281-2/+3
| | | | OK djm@ claudio@ dlg@
* Add L2TP support to PIPEX.hsuenaga2010-09-241-4/+5
| | | | | | | | We can use IPv6 address as outer header of L2TP. Kernel ABI is changed. You must update npppd. OK @claudio, yasuoka@, dlg@
* Implement a simple keepalive mechanism in gre(4) that is compatible withclaudio2010-06-261-1/+6
| | | | | | the one used by Cisco. It sends a return gre packet inside a gre packet to the other side and expects it to return. OK deraadt, reyk additional testing by sthen
* Add support for MPLS in GRE. Fairly trivial and a NOP unless option MPLSclaudio2010-05-111-2/+14
| | | | is defined.
* remove proc.h include from uvm_map.h. This has far reaching effects, astedu2010-04-201-1/+2
| | | | | | sysctl.h was reliant on this particular include, and many drivers included sysctl.h unnecessarily. remove sysctl.h or add proc.h as needed. ok deraadt
* Add input and user protocol hook to handle GRE packets by pipex.yasuoka2010-01-121-1/+55
| | | | ok @dlg
* Add a way to bind the tunnel endpoint of a gif/gre interface into aclaudio2009-11-211-1/+5
| | | | | different rdomain than the default one. This allows to do MPLS VPNs without the MPLS madness. OK deraadt@, henning@
* do the pf_pkt_addr_changed(m) magic just like gif etchenning2009-06-021-1/+9
| | | | tested by Manuel Rodriguez Morales <marodriguez at grupogdt.com>
* First pass at removing clauses 3 and 4 from NetBSD licenses.ray2008-06-261-8/+1
| | | | | | | | | Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
* De-static. OK dlg@claudio2007-05-271-3/+3
|
* ``it's'' -> ``its'' when the grammar gods require this change.miod2007-04-101-2/+2
|
* allow bpf(4) to ignore packets based on their direction (inbound ordjm2006-03-251-3/+3
| | | | | outbound), using a new BIOCSDIRFILT ioctl; guidance, feedback and ok canacar@
* With the exception of two other small uncommited diffs this movesbrad2006-03-041-3/+3
| | | | | | the remainder of the network stack from splimp to splnet. ok miod@
* Introduce bpf_mtap_af and bpf_mtap_hdr to be used when passing a mbuf chainpascoe2005-07-311-36/+5
| | | | | | | | | | to bpf with either an address family or other header added. These helpers only allocate a much smaller struct m_hdr on the stack when needed, rather than leaving 256 byte struct mbufs on the stack in deep call paths. Also removes a fair bit of duplicated code. commit now, tune after deraadt@
* netns bites the dusthenning2005-06-081-13/+1
|
* use IF_INPUT_ENQUEUEpb2004-06-261-13/+3
| | | | ok henning@, mcbride@
* de-register. deraadt okitojun2003-12-101-9/+9
|
* add support for ifconfig clone/destroy; ok henning deraadtmarkus2003-12-031-3/+2
|
* do not flip ip_len/ip_off in netinet stack. deraadt ok.itojun2003-07-091-3/+2
| | | | (please test, especially PF portion)