Commit Graph

34 Commits

Author SHA1 Message Date
Andrey V. Elsukov
009d82ee0f Add handling for appearing/disappearing of ingress addresses to if_gif(4).
* register handler for ingress address appearing/disappearing;
* add new srcaddr hash table for fast softc lookup by srcaddr;
* when srcaddr disappears, clear IFF_DRV_RUNNING flag from interface,
  and set it otherwise;
* remove the note about ingress address from BUGS section.

MFC after:	1 month
Sponsored by:	Yandex LLC
Differential Revision:	https://reviews.freebsd.org/D17134
2018-10-21 18:06:15 +00:00
Andrey V. Elsukov
b941bc1d6e Rework if_gif(4) to use new encap_lookup_t method to speedup lookup
of needed interface when many gif interfaces are present.

Remove rmlock from gif_softc, use epoch(9) and CK_LIST instead.
Move more AF-related code into AF-related locations.
Use hash table to speedup lookup of needed softc. Interfaces
with GIF_IGNORE_SOURCE flag are stored in plain CK_LIST.
Sysctl net.link.gif.parallel_tunnels is removed. The removal was planed
16 years ago, and actually it could work only for outbound direction.
Each protocol, that can be handled by if_gif(4) interface is registered
by separate encap handler, this helps avoid invoking the handler
for unrelated protocols (GRE, PIM, etc.).

This change allows dramatically improve performance when many gif(4)
interfaces are used.

Sponsored by:	Yandex LLC
2018-06-05 21:24:59 +00:00
Hiroki Sato
b1c250ff3f - Remove GIF_{SEND,ACCEPT}_REVETHIP.
- Simplify EADDRNOTAVAIL and EAFNOSUPPORT conditions.

MFC after:	3 days
2015-09-10 05:59:39 +00:00
Andrey V. Elsukov
0b9f5f8a5f Overhaul if_gif(4):
o convert to if_transmit;
 o use rmlock to protect access to gif_softc;
 o use sx lock to protect from concurrent ioctls;
 o remove a lot of unneeded and duplicated code;
 o remove cached route support (it won't work with concurrent io);
 o style fixes.

Reviewed by:	melifaro
Obtained from:	Yandex LLC
MFC after:	1 month
Sponsored by:	Yandex LLC
2014-10-14 13:31:47 +00:00
Glen Barber
12eab787f3 Provide a more user friendly URL to the IETF site in gif(4).
Pointed out by:		dougb
MFC after:		3 days
Approved by:		re (hrs)
2011-08-02 01:48:45 +00:00
Glen Barber
5d5140280b Fix various broken links in manual pages.
Submitted by:	Michiel Overtoom (motoom % xs4all nl)
PR:		159130 159131 159132 159133 159134
		159135 159136 159137 158138 159144
Approved by:	re (kib)
MFC after:	3 days
2011-07-23 22:55:32 +00:00
Ruslan Ermilov
aa4a335bae Use the newly brought %U macro. 2010-01-15 16:01:22 +00:00
Hiroki Sato
dbe5926046 Fix and add a workaround on an issue of EtherIP packet with reversed
version field sent via gif(4)+if_bridge(4).  The EtherIP
implementation found on FreeBSD 6.1, 6.2, 6.3, 7.0, 7.1, and 7.2 had
an interoperability issue because it sent the incorrect EtherIP
packets and discarded the correct ones.

This change introduces the following two flags to gif(4):

 accept_rev_ethip_ver: accepts both correct EtherIP packets and ones
    with reversed version field, if enabled.  If disabled, the gif
    accepts the correct packets only.  This flag is enabled by
    default.

 send_rev_ethip_ver: sends EtherIP packets with reversed version field
    intentionally, if enabled.  If disabled, the gif sends the correct
    packets only.  This flag is disabled by default.

These flags are stored in struct gif_softc and can be set by
ifconfig(8) on per-interface basis.

Note that this is an incompatible change of EtherIP with the older
FreeBSD releases.  If you need to interoperate older FreeBSD boxes and
new versions after this commit, setting "send_rev_ethip_ver" is
needed.

Reviewed by:	thompsa and rwatson
Spotted by:	Shunsuke SHINOMIYA
PR:		kern/125003
MFC after:	2 weeks
2009-06-07 23:00:40 +00:00
Tom Rhodes
d8d65971ac Do not reference gifconfig, it is gone.
Sponsored by:	Chaffee::Interactive
2005-07-26 18:14:22 +00:00
Greg Lehey
bf11e8ea9c Clarify that gif doesn't do GRE tunnels.
MFC after:	2 weeks
2005-06-08 01:53:25 +00:00
Gleb Smirnoff
fc2857ad10 Document route caching, how it can be enabled, and its consequences.
Wording by:	cperciva
2004-12-06 19:31:35 +00:00
Marc Fonvieille
813ec9a835 Remove a duplicated word.
Submitted by:	Pawel Worach <pawel.worach@telia.com>
2004-09-24 20:09:44 +00:00
Ruslan Ermilov
ace5be682d mdoc(7) police: Scheduled sweep. 2003-02-24 22:53:26 +00:00
Hajimu UMEMOTO
4a9054ab88 gifconfig(8) was depricated.
Reported by:	rwatson
2003-01-04 05:32:48 +00:00
Ruslan Ermilov
5faba7ef6b mdoc(7) police: pseudo-devices are gone from -CURRENT. 2002-08-13 13:50:36 +00:00
Tom Rhodes
f7560bd3a7 Fix grammar 'the administrator'
PR:		39093
Submitted by:	Mike Makonnen <makonnen@packbell.net>
2002-07-15 16:23:56 +00:00
Ruslan Ermilov
d0f16f93db mdoc(7) police: nits. 2002-03-18 12:34:41 +00:00
Brooks Davis
872f786a75 Make gif(4) nesting level and parallel tunnel support tunable at runtime
via sysctl's.  The old #defines, MAX_GIF_NEST and XBONEHACK are
currently supported for backwards compatability, but will probably be
removed at some point in the future.
2002-02-26 01:56:56 +00:00
Ruslan Ermilov
fb5293cf53 mdoc(7) police: tidy up previous delta. 2002-01-09 15:32:25 +00:00
Brooks Davis
601404ecef Better document gif interface cloning intrastructure.
MFC After:	2 days
2001-12-14 22:55:10 +00:00
Ruslan Ermilov
0787ca52b4 mdoc(7) police: removed hard sentence break. 2001-10-01 13:06:40 +00:00
Brooks Davis
f823d4a671 Mention that gif interfaces are created at runtime and refer the
administrator to the ifconfig create command.

MFC after:	1 week
2001-09-28 00:22:44 +00:00
Brooks Davis
fe403d8d0d gif(4) is no longer a count device, reflect this change. 2001-09-06 00:27:48 +00:00
Ruslan Ermilov
c75526d5a0 mdoc(7) police: fixed the "new sentence" bogons. 2001-08-10 15:03:10 +00:00
Ruslan Ermilov
c4d9468ea0 mdoc(7) police:
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
2001-08-07 15:48:51 +00:00
Hajimu UMEMOTO
3384154590 Sync with recent KAME.
This work was based on kame-20010528-freebsd43-snap.tgz and some
critical problem after the snap was out were fixed.
There are many many changes since last KAME merge.

TODO:
  - The definitions of SADB_* in sys/net/pfkeyv2.h are still different
    from RFC2407/IANA assignment because of binary compatibility
    issue.  It should be fixed under 5-CURRENT.
  - ip6po_m member of struct ip6_pktopts is no longer used.  But, it
    is still there because of binary compatibility issue.  It should
    be removed under 5-CURRENT.

Reviewed by:	itojun
Obtained from:	KAME
MFC after:	3 weeks
2001-06-11 12:39:29 +00:00
Jens Schweikhardt
ec09ef4ff8 pseudo-device -> device in kernel config lines. Removed whitespace at EOL.
Reviewed by:	joerg, dd
2001-05-01 09:15:30 +00:00
Ruslan Ermilov
eb0838029f mdoc(7) police: normalize .Nd. 2001-04-18 15:54:10 +00:00
Ruslan Ermilov
4b66483fd8 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 18:41:33 +00:00
Jun-ichiro itojun Hagino
f60386610a sync with kame. more security warnings 2000-07-05 08:15:05 +00:00
Yoshinobu Inoue
07b9e12973 Backout previous changes. The period at the end is correct,
when it is the last of the sentences.

Specified by: mpp, sheldonh
2000-03-15 03:33:30 +00:00
Yoshinobu Inoue
bc578dc4ac Remove period at the end of Xr macro sentences.
(merge from KAME repository)

Obtained from: KAME project
2000-03-12 16:10:13 +00:00
Jeroen Ruigrok van der Werven
12900fe317 Change .Os macro to an empty one to denote that the KAME files are
not FreeBSD specific.

Made happy:	sheldonh
2000-01-17 15:24:41 +00:00
Yoshinobu Inoue
9a4365d0e0 libipsec and IPsec related apps. (and some KAME related man pages)
Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project
2000-01-06 12:40:54 +00:00