summaryrefslogtreecommitdiffstats
path: root/sys/net/if_gre.c
Commit message (Collapse)AuthorAgeFilesLines
* /* -> /*- for license, minor formatting changesimp2005-01-071-1/+1
|
* Set ip_v field properly.sobomax2004-08-051-0/+1
| | | | PR: kern/69957
* Do a pass over all modules in the kernel and make them return EOPNOTSUPPphk2004-07-151-0/+2
| | | | | | | | for unknown events. A number of modules return EINVAL in this instance, and I have left those alone for now and instead taught MOD_QUIESCE to accept this as "didn't do anything".
* Use M_ZERO instead of memset() (!).bms2004-07-061-2/+1
|
* Major overhaul of pseudo-interface cloning. Highlights include:brooks2004-06-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Split the code out into if_clone.[ch]. - Locked struct if_clone. [1] - Add a per-cloner match function rather then simply matching names of the form <name><unit> and <name>. - Use the match function to allow creation of <interface>.<tag> vlan interfaces. The old way is preserved unchanged! - Also the match function to allow creation of stf(4) interfaces named stf0, stf, or 6to4. This is the only major user visible change in that "ifconfig stf" creates the interface stf rather then stf0 and does not print "stf0" to stdout. - Allow destroy functions to fail so they can refuse to delete interfaces. Currently, we forbid the deletion of interfaces which were created in the init function, particularly lo0, pflog0, and pfsync0. In the case of lo0 this was a panic implementation so it does not count as a user visiable change. :-) - Since most interfaces do not need the new functionality, an family of wrapper functions, ifc_simple_*(), were created to wrap old style cloner functions. - The IF_CLONE_INITIALIZER macro is replaced with a new incompatible IFC_CLONE_INITIALIZER and ifc_simple consumers use IFC_SIMPLE_DECLARE instead. Submitted by: Maurycy Pawlowski-Wieronski <maurycy at fouk.org> [1] Reviewed by: andre, mlaier Discussed on: net
* add missing #include <sys/module.h>phk2004-05-301-0/+1
|
* Add the comment of the previous commit to the source file directly.andre2004-04-231-1/+5
| | | | Requested by: ru
* Call ip_output() with IP_FORWARD flag to prevent it from overwriting theandre2004-04-231-2/+2
| | | | | | | | ip_id again. ip_id is already set to the ip_id of the encapsulated packet. Make a comment about mbuf allocation failures more realistic. Reviewed by: sobomax
* Lock down global variables in if_gre:rwatson2004-03-221-8/+33
| | | | | | | | | | | | | | - Add gre_mtx to protect global softc list. - Hold gre_mtx over various list operations (insert, delete). - Centralize if_gre interface teardown in gre_destroy(), and call this from modevent unload and gre_clone_destroy(). - Export gre_mtx to ip_gre.c, which walks the gre list to look up gre interfaces during encapsulation. Add a wonking comment on how we need some sort of drain/reference count mechanism to keep gre references alive while in use and simultaneous destroy. This commit does not lockdown softc data, which follows in a future commit.
* Remove NetBSD'isms (add FreeBSD'isms?), which makes gre(4) working again.sobomax2004-01-301-3/+2
|
* Add support for WCCPv2. It should be enablem manually using link2sobomax2004-01-261-0/+5
| | | | | | | | ifconfig(8) flag since header for version 2 is the same but IP payload is prepended with additional 4-bytes field. Inspired by: Roman Synyuk <roman@univ.kiev.ua> MFC after: 2 weeks
* (whilespace-only)sobomax2004-01-261-2/+2
| | | | Kill trailing spaces.
* Sync with NetBSD:sobomax2003-12-301-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if_gre.c rev.1.41-1.49 o Spell output with two ts. o Remove assigned-to but not used variable. o fix grammatical error in a diagnostic message. o u_short -> u_int16_t. o gi_len is ip_len, so it has to be network byteorder. if_gre.h rev.1.11-1.13 o prototype must not have variable name. o u_short -> u_int16_t. o Spell address with two d's. ip_gre.c rev.1.22-1.29 o KNF - return is not a function. o The "osrc" variable in gre_mobile_input() is only ever set but not referenced; remove it. o correct (false) assumptions on mbuf chain. not sure if it really helps, but anyways, it is necessary to perform m_pullup. o correct arg to m_pullup (need to count IP header size as well). o remove redundant adjustment of m->m_pkthdr.len. o clear m_flags just for safety. o tabify. o u_short -> u_int16_t. MFC after: 2 weeks
* o eliminate widespread on-stack mbuf use for bpf by introducingsam2003-12-281-8/+1
| | | | | | | | | | | | | a new bpf_mtap2 routine that does the right thing for an mbuf and a variable-length chunk of data that should be prepended. o while we're sweeping the drivers, use u_int32_t uniformly when when prepending the address family (several places were assuming sizeof(int) was 4) o return M_ASSERTVALID to BPF_MTAP* now that all stack-allocated mbufs have been eliminated; this may better be moved to the bpf routines Reviewed by: arch@ and several others
* Declare gre(4) as being of IFT_TUNNEL, Like God Intended.bms2003-12-091-2/+2
| | | | Suggested by: fenner
* Fix a bug whereby the physical endpoints of a gre(4) tunnel would notbms2003-11-141-0/+7
| | | | | | | | | | | | | be printed, if the module were loaded into a kernel which had INET6 enabled. The gre(4) driver does not use INET6, nor is it specified for IPv6. The tunnel_status() function in ifconfig(8) is somewhat overzealous and assumes that all tunnel interfaces speak KAME ifioctls. This fix follows the path of least resistance, by teaching gre(4) about the two KAME ifioctls concerned. PR: bin/56341
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-311-2/+1
| | | | | | | | | | | | | if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname)
* Finish driving a stake through the heart of netns and the associatedpeter2003-03-051-6/+0
| | | | | | ifdefs scattered around the place - its dead Jim! The SMB stuff had stolen AF_NS, make it official.
* Back out M_* changes, per decision of the TRB.imp2003-02-191-3/+3
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-3/+3
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* network interface and link layer changes:sam2002-11-151-1/+1
| | | | | | | | | | | | o on input don't strip the Ethernet header from packets o input packet handling is now done with if_input o track changes to ether_ifattach/ether_ifdetach API o track changes to bpf tapping o call ether_ioctl for default handling of ioctl's o use constants from net/ethernet.h where possible Reviewed by: many Approved by: re
* de-__P()alfred2002-10-161-3/+3
|
* Replace aux mbufs with packet tags:sam2002-10-161-1/+1
| | | | | | | | | | | | | | | | | | | o instead of a list of mbufs use a list of m_tag structures a la openbsd o for netgraph et. al. extend the stock openbsd m_tag to include a 32-bit ABI/module number cookie o for openbsd compatibility define a well-known cookie MTAG_ABI_COMPAT and use this in defining openbsd-compatible m_tag_find and m_tag_get routines o rewrite KAME use of aux mbufs in terms of packet tags o eliminate the most heavily used aux mbufs by adding an additional struct inpcb parameter to ip_output and ip6_output to allow the IPsec code to locate the security policy to apply to outbound packets o bump __FreeBSD_version so code can be conditionalized o fixup ipfilter's call to ip_output based on __FreeBSD_version Reviewed by: julian, luigi (silent), -arch, -net, darren Approved by: julian, silence from everyone else Obtained from: openbsd (mostly) MFC after: 1 month
* Since bpf is no longer an optional component, remove associated ifdef's.sobomax2002-10-021-9/+0
| | | | | Submitted by: don't quite remember - the name of the sender disappeared with the rest of my inbox. :(
* Remove __RCSID().sobomax2002-09-171-3/+0
| | | | Submitted by: bde
* Include include "opt_atalk.h" so that the NETATALK support can work.bde2002-09-161-17/+1
| | | | | | | | | Removed unused includes. Removed used includes of <sys/queue.h> and <sys/time.h>, since these are standard pollution (especially the latter). Reviewed by: sobomax
* Include <sys/systm.h> instead of depending on namespace pollution 2bde2002-09-151-0/+1
| | | | layers deep in <sys/malloc.h> or 1 layer deep in <net/if_var.h>.
* Reduce namespace pollution by staticizing everything, which doesn't need tosobomax2002-09-061-13/+15
| | | | be visible from outside of the module.
* Add a new gre(4) driver, which could be used to create GRE (RFC1701)sobomax2002-09-061-0/+781
and MOBILE (RFC2004) IP tunnels. Obrained from: NetBSD
OpenPOWER on IntegriCloud