summaryrefslogtreecommitdiff
path: root/sys/net/if_gif.c
AgeCommit message (Collapse)Author
2013-06-17Instead of bcopy() and bcmp() a single pointer in an mbuf tag,Alexander Bluhm
assign with = and compare with == . This way the compiler will check deeper wether the cast is correct. Alignment is fine, tested on sparc64. OK claudio@
2013-06-16Remove variable sa_family_t family in gif_start() and gif_output().Alexander Bluhm
No functional change. From David Hill; OK claudio@
2013-03-26Remove various read-only *maxlen variables and use IFQ_MAXLEN directly.Martin Pieuchot
ok beck@, mikeb@
2013-01-17first or second coming, commie or not commie, one m in coming is sufficientHenning Brauer
ok claudio
2012-10-05Point an interface directly to its bridgeport configuration, insteadCamiel Dobbelaar
of to the bridge itself. This is ok, since an interface can only be part of one bridge, and the parent bridge is easy to find from the bridgeport. This way we can get rid of a lot of list walks, improving performance and shortening the code. ok henning stsp sthen reyk
2012-05-12Fix tcpdump for etherip packets.Marco Pfatschbacher
bpf_mtap() needs to be called without the etherip_header. Idea to use a forward declaration for struct tdb by claudio. OK claudio@
2012-04-14Use DLT_LOOP for all tunneling interfaces.YASUOKA Masahiko
Byte order adjustment for bpf was hidden behind bpf_mtap_af() and sizeof(u_int32_t) is used for length of the bpf header. tested by sebastia and mxb at alumni.chalmers.se. ok claudio
2010-07-03Fix the naming of interfaces and variables for rdomains and rtablesPhilip Guenthe
and make it possible to bind sockets (including listening sockets!) to rtables and not just rdomains. This changes the name of the system calls, socket option, and ioctl. After building with this you should remove the files /usr/share/man/cat2/[gs]etrdomain.0. Since this removes the existing [gs]etrdomain() system calls, the libc major is bumped. Written by claudio@, criticized^Wcritiqued by me
2010-05-11Massiv cleanup of the gif(4) mess. Move encapsulation into gif_output()Claudio Jeker
where it is not necessary to guess protocols by looking at the first nibble. in_gif_output() will encapsulate the packet but not send it. Because of etherip support and the way the bridge works a minimal hack is needed in gif_start() to ensure that the bridged packets are encapsulated as well. This actually started with the idea to add MPLS support but that turned out to be not as simple as in the gre(4) case. Tested by myself (IP, IPv6, etherip, MPLS), sthen@ (IP, IPv6), naddy (IPv6) OK sthen@
2009-11-22Add a lot of bpf and counter manipulation to the bridge. The bridgeTheo de Raadt
sneaks packets on and off network interfaces in some cases without calling the interrupt, start, or output functions, and thus must do these tasks which the drivers cannot do. The gif and vether are rather special. Someone should re-check gre. ok claudio
2009-11-21Add a way to bind the tunnel endpoint of a gif/gre interface into aClaudio Jeker
different rdomain than the default one. This allows to do MPLS VPNs without the MPLS madness. OK deraadt@, henning@
2008-11-24Remove the IFF_OACTIVE dance in gif_start this is not needed because startClaudio Jeker
functions will never ever be called in parallel. dlg@ concured
2008-09-28Ansify function declarations for gif(4).Joel Sing
ok claudio@
2008-05-07enable tx mitigation when putting packets on the wire by switching fromDavid Gwynne
calls to ifp->if_start to if_start(). these are the obviously right cases where we can do that, the less obvious ones may follow as theyre figured out. deraadt@ said to go for it
2008-04-26Typo, paket -> packet.Brad Smith
2007-12-20return with ENOTTY instead of EINVAL for unknown ioctl requests.Brad Smith
ok claudio@ krw@ jason@ dlg@
2007-09-15malloc sweep:Henning Brauer
-remove useless casts -MALLOC/FREE -> malloc/free -use M_ZERO where appropriate instead of seperate bzero feedback & ok krw, hshoexer
2007-05-26one extern seems to be better than 20 for ifqmaxlen; ok krwJason Wright
2007-05-21make bridge(4) mark packets with M_PROTO1 if gif(4) needs to useMarkus Friedl
etherip encapsulation; unbreaks remote ipsec bridges; ok claudio; additional testing Renaud Allard
2007-04-19Cleanup spaces.Claudio Jeker
2007-04-18Break out of the mtag check loop when a hit was found else we end up in aClaudio Jeker
double free. Found and tested by Stefan Schmieta. OK markus@ mbalmer@
2007-02-22Make gif(4) altq aware. This simplifies setting up traffic shaping on gif(4)Claudio Jeker
tunnels. Additional testing by Marc Winiger. OK kjc@ mbalmer@
2007-02-10Cleanup, kill dead code and unused arguments. Mostly stuff that is computedClaudio Jeker
and passed around but never used. OK mglocker@
2007-01-08add round brackets around return valuesMichele Marchetto
2006-12-28check if ifqueue has anything queued before doing the dance ofTheo de Raadt
splnet/IF_DEQUEUE/splx; ok various people
2006-11-16knfJun-ichiro itojun Hagino
2006-03-25allow bpf(4) to ignore packets based on their direction (inbound orDamien Miller
outbound), using a new BIOCSDIRFILT ioctl; guidance, feedback and ok canacar@
2006-03-11Check against GIF_MTU_MIN/GIF_MTU_MAX for the min/max MTU size.Brad Smith
2006-03-04With the exception of two other small uncommited diffs this movesBrad Smith
the remainder of the network stack from splimp to splnet. ok miod@
2006-01-04Remove redundant calls to bpfdetach.Can Erkin Acar
ok brad@
2005-07-31Introduce bpf_mtap_af and bpf_mtap_hdr to be used when passing a mbuf chainChristopher Pascoe
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@
2003-12-16return error in ifc_destroy; ok deraadt, itojun, cedric, hshoexerMarkus Friedl
2003-12-10de-register. deraadt okJun-ichiro itojun Hagino
2003-12-03add support for ifconfig clone/destroy; ok henning deraadtMarkus Friedl
2003-05-03string fixes; tedu okTheo de Raadt
2003-05-03just as a safety measure, set m_flags to 0 for mbufs allocated on stack.Jun-ichiro itojun Hagino
dhartmei ok
2003-01-20just for safety. from http://templeofhate.com/tglaser/pub/obsd.diffJun-ichiro itojun Hagino
2002-06-30allocate sockaddr_dl for ifnet in if_alloc_sadl(), as we don't always knowJun-ichiro itojun Hagino
the size of sockaddr_dl on if_attach() - for instance, see ether_ifattach(). from netbsd. fgs ok
2002-06-10easy error checks first.Jun-ichiro itojun Hagino
2002-06-09no need to log() on outgoing packet on !IFF_UP caseJun-ichiro itojun Hagino
2002-05-20Allow SIOCSIFMTU on gif interfaces.Artur Grabowski
From Mattias Amnefelt mattiasa at e.kth.se. niels@ ok.
2002-03-14First round of __P removal in sysTodd C. Miller
2001-07-27variable name "gif" is way too generic - use "gif_softc". sync with kameJun-ichiro itojun Hagino
2001-06-25Detect loops, itojun@ okAngelos D. Keromytis
2001-06-15change the meaning of ifnet.if_lastchange to meet RFC1573 ifLastChange.Jun-ichiro itojun Hagino
follows BSD/OS practice and ucd-snmp code (FreeBSD does it for specific interfaces only). was: if_lastchange get updated on every packet transmission/receipt. now: if_lastchange get updated when IFF_UP is changed.
2001-06-09Include cleanupAngelos D. Keromytis
2001-06-09These don't need net_osdep.hAngelos D. Keromytis
2001-06-04if_up() requires splnet(). sync with kameJun-ichiro itojun Hagino
2001-02-20provide SIOC[SG]LIFPHYADDR, which greatly simplify userland manipulation.Jun-ichiro itojun Hagino
sync with kame. old ioctls are kept but not really recommended.
2001-02-20use u_int32_t, not u_int, for DLT_NULL encapsulation. sync with kameJun-ichiro itojun Hagino