Commit Graph

60 Commits

Author SHA1 Message Date
Glen Barber
406d87b1c3 Explicitly add more files to the 'runtime' package.
Sponsored by:	The FreeBSD Foundation
2016-02-09 20:19:31 +00:00
Baptiste Daroussin
1921045de0 Reduce overlinking
ifconfig does not need libbsdxml and libsbuf only lib80211 needs it
2015-12-24 11:30:29 +00:00
Adrian Chadd
d01cb677ba Convert ifconfig to use lib80211.
* remove regdomain.[ch] - it's now part of lib80211.
* convert ifieee80211.c to use the ioctl routines in lib80211 and
  implement the "error? exit" wrapper behaviour the callers expect.
2015-11-30 06:34:16 +00:00
Enji Cooper
b219c275cc Integrate sbin/ifconfig/tests from NetBSD into atf/kyua
Sponsored by: EMC / Isilon Storage Division
2015-01-04 22:25:16 +00:00
Bryan Venteicher
c6e32006e1 Prefix all the vxlan ifconfig commands so they are unique
And rehook ifvxlan back into the build.
2014-12-17 05:36:34 +00:00
Dag-Erling Smørgrav
5d083d287b Disable the vxlan code until the people reponsible for it can come up with
new command names that don't conflict with existing commands.

Pointy hat to:	bryanv
2014-12-01 12:59:16 +00:00
Baptiste Daroussin
13eb765f2d Convert sbin/ to LIBADD
Reduce overlinking
2014-11-25 11:23:12 +00:00
Bryan Venteicher
007054f070 Add vxlan interface
vxlan creates a virtual LAN by encapsulating the inner Ethernet frame in
a UDP packet. This implementation is based on RFC7348.

Currently, the IPv6 support is not fully compliant with the specification:
we should be able to receive UPDv6 packets with a zero checksum, but we
need to support RFC6935 first. Patches for this should come soon.

Encapsulation protocols such as vxlan emphasize the need for the FreeBSD
network stack to support batching, GRO, and GSO. Each frame has to make
two trips through the network stack, and each frame will be at most MTU
sized. Performance suffers accordingly.

Some latest generation NICs have begun to support vxlan HW offloads that
we should also take advantage of. VIMAGE support should also be added soon.

Differential Revision:	https://reviews.freebsd.org/D384
Reviewed by:	gnn
Relnotes:	yes
2014-10-20 14:42:42 +00:00
Alexander V. Chernikov
3e0aeae44a Add forgotten DPADD to ifconfig(8).
PR:		192760
Submitted by:	yaneurabeya at gmail.com
MFC after:	2 weeks
2014-08-17 20:06:47 +00:00
Alexander V. Chernikov
f732123e6b Add support for reading i2c SFP/SFP+ data from NIC driver and
presenting most interesting fields via ifconfig -v.
This version supports Intel ixgbe driver only.

Tested on:	Cisco,Intel,Mellanox,ModuleTech,Molex transceivers
MFC after:	2 weeks
2014-08-16 19:13:52 +00:00
Warner Losh
c6063d0da8 Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.
2014-05-06 04:22:01 +00:00
Alan Somers
d4e612d08d Remove the ifconfig test added in rev 263445. After discussion with
melifaro, we agreed that ifconfig's behavior was not a bug.  The main
motivation for bin/187551 was to partially resolve kern/187549, but we
resolved kern/187549 in a different way instead.

ObsoleteFiles.inc
etc/mtree/BSD.tests.dist
sbin/ifconfig/tests/fibs_test.sh
sbin/ifconfig/tests/Makefile
sbin/ifconfig/Makefile
	Remove /usr/tests/sbin/ifconfig

PR:		bin/187551
MFC after:	3 days
Sponsored by:	Spectra Logic
2014-05-05 19:38:29 +00:00
Alan Somers
f227705fdb Add several ATF tests that deal with multiple fibs. They're described in
several different PRs, but the tests share some common code, so I'm
committing them together.

sbin/ifconfig/tests
sbin/ifconfig/tests/fibs_test.sh
sbin/ifconfig/tests/Makefile
sbin/ifconfig/Makefile
	Add fibs_test.sh, which regresses bin/187551

tests/sys/netinet
tests/sys/netinet/fibs_test.sh
tests/sys/netinet/udp_dontroute.c
tests/sys/netinet/Makefile
tests/sys/Makefile
	Add fibs_test.sh, which regresses kern/167947, kern/187552
	kern/187549, kern/187550, and kern/187553

etc/mtree/BSD.tests.dist
	Add newly created directories

PR:		bin/187551
PR:		kern/167947
PR:		kern/187552
PR:		kern/187549
PR:		kern/187550
PR:		kern/187553
Discussed with:	melifaro
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corporation
2014-03-20 20:39:41 +00:00
Gleb Smirnoff
45c203fce2 Remove AppleTalk support.
AppleTalk was a network transport protocol for Apple Macintosh devices
in 80s and then 90s. Starting with Mac OS X in 2000 the AppleTalk was
a legacy protocol and primary networking protocol is TCP/IP. The last
Mac OS X release to support AppleTalk happened in 2009. The same year
routing equipment vendors (namely Cisco) end their support.

Thus, AppleTalk won't be supported in FreeBSD 11.0-RELEASE.
2014-03-14 06:29:43 +00:00
Gleb Smirnoff
2c284d9395 Remove IPX support.
IPX was a network transport protocol in Novell's NetWare network operating
system from late 80s and then 90s. The NetWare itself switched to TCP/IP
as default transport in 1998. Later, in this century the Novell Open
Enterprise Server became successor of Novell NetWare. The last release
that claimed to still support IPX was OES 2 in 2007. Routing equipment
vendors (e.g. Cisco) discontinued support for IPX in 2011.

Thus, IPX won't be supported in FreeBSD 11.0-RELEASE.
2014-03-14 02:58:48 +00:00
Gleb Smirnoff
3e4d5cd37b Make userland tools honor WITHOUT_PF build option.
Tested by:	dt71@gmx.com
2013-10-29 17:38:13 +00:00
Robert Millan
9697f9f801 Disable jail support in ifconfig when either building a rescue
image or MK_JAIL knob has been set to "no".

Reviewed by:	bz
Approved by:	adrian (mentor)
2012-02-14 07:14:42 +00:00
Gleb Smirnoff
5f02482794 Rename ifcarp.c to carp.c 2011-12-16 14:30:58 +00:00
Bjoern A. Zeeb
35fd7bc020 Add infrastructure to allow all frames/packets received on an interface
to be assigned to a non-default FIB instance.

You may need to recompile world or ports due to the change of struct ifnet.

Submitted by:	cjsp
Submitted by:	Alexander V. Chernikov (melifaro ipfw.ru)
		(original versions)
Reviewed by:	julian
Reviewed by:	Alexander V. Chernikov (melifaro ipfw.ru)
MFC after:	2 weeks
X-MFC:		use spare in struct ifnet
2011-07-03 12:22:02 +00:00
Bjoern A. Zeeb
5af3fa9a5f Conditionally compile in the af_inet and af_inet6, af_nd6 modules.
If compiled in for dual-stack use, test with feature_present(3)
to see if we should register the IPv4/IPv6 address family related
options.

In case there is no "inet" support we would love to go with the
usage() and make the address family mandatory (as it is for anything
but inet in theory).  Unfortunately people are used to
  ifconfig IF up/down
etc. as well, so use a fallback of "link".  Adjust the man page
to reflect these minor details.

Improve error handling printing a warning in addition to the usage
telling that we do not know the given address family in two places.

Reviewed by:	hrs, rwatson
Sponsored by:	The FreeBSD Foundation
Sponsored by:	iXsystems
MFC after:	2 weeks
2011-05-31 14:40:21 +00:00
Ruslan Ermilov
bee10047c0 Fixed dependencies (make checkdpadd). 2010-02-25 20:24:19 +00:00
Ed Schouten
f6d189a9e4 Raise WARNS for various tools where possible.
Submitted by:	Marius Nünnerich <marius@nuenneri.ch>
2010-01-17 21:56:27 +00:00
Hiroki Sato
a283298ce3 Improve flexibility of receiving Router Advertisement and
automatic link-local address configuration:

- Convert a sysctl net.inet6.ip6.accept_rtadv to one for the
  default value of a per-IF flag ND6_IFF_ACCEPT_RTADV, not a
  global knob.  The default value of the sysctl is 0.

- Add a new per-IF flag ND6_IFF_AUTO_LINKLOCAL and convert a
  sysctl net.inet6.ip6.auto_linklocal to one for its default
  value.  The default value of the sysctl is 1.

- Make ND6_IFF_IFDISABLED more robust.  It can be used to disable
  IPv6 functionality of an interface now.

- Receiving RA is allowed if ip6_forwarding==0 *and*
  ND6_IFF_ACCEPT_RTADV is set on that interface.  The former
  condition will be revisited later to support a "host + router" box
  like IPv6 CPE router.  The current behavior is compatible with
  the older releases of FreeBSD.

- The ifconfig(8) now supports these ND6 flags as well as "nud",
  "prefer_source", and "disabled" in ndp(8).  The ndp(8) now
  supports "auto_linklocal".

Discussed with:	bz and jinmei
Reviewed by:	bz
MFC after:	3 days
2009-09-12 22:08:20 +00:00
Jamie Gritton
5061de23fa Add the "vnet" and "-vnet" options, to allow moving interfaces between
jails with VIMAGE.

Approved by:	bz (mentor)
2009-06-24 18:21:37 +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
Andrew Thompson
3b0edf7dd0 Move the grekey to its own file, ifconfig.c does not have interface specific
code.

Submitted by:	sam
2008-08-03 03:36:12 +00:00
Sam Leffler
b032f27c36 Multi-bss (aka vap) support for 802.11 devices.
Note this includes changes to all drivers and moves some device firmware
loading to use firmware(9) and a separate module (e.g. ral).  Also there
no longer are separate wlan_scan* modules; this functionality is now
bundled into the wlan module.

Supported by:	Hobnob and Marvell
Reviewed by:	many
Obtained from:	Atheros (some bits)
2008-04-20 20:35:46 +00:00
Andrew Thompson
18242d3b09 Rename the trunk(4) driver to lagg(4) as it is too similar to vlan trunking.
The name trunk is misused as the networking term trunk means carrying multiple
VLANs over a single connection. The IEEE standard for link aggregation (802.3
section 3) does not talk about 'trunk' at all while it is used throughout IEEE
802.1Q in describing vlans.

The lagg(4) driver provides link aggregation, failover and fault tolerance.

Discussed on:	current@
2007-04-17 00:35:11 +00:00
Andrew Thompson
7b62d98bf8 Hook trunk(4) up to the build. 2007-04-10 00:35:31 +00:00
Max Laier
0dad3f0e15 Import interface groups from OpenBSD. This allows to group interfaces in
order to - for example - apply firewall rules to a whole group of
interfaces.  This is required for importing pf from OpenBSD 3.9

Obtained from:	OpenBSD (with changes)
Discussed on:	-net (back in April)
2006-06-19 22:20:45 +00:00
Ruslan Ermilov
cea557add0 Extend coverage of the MK_IPX build option to the following:
- <netipx> headers [1]
- IPX library (libipx)
- IPX support in ifconfig(8)
- IPXrouted(8)
- new MK_NCP option

New MK_NCP build option controls:

- <netncp> and <fs/nwfs> headers
- NCP library (libncp)
- ncplist(1) and ncplogin(1)
- mount_nwfs(8)
- ncp and nwfs kernel modules

User knobs: WITHOUT_IPX, WITHOUT_IPX_SUPPORT, WITHOUT_NCP.

[1] <netsmb/netbios.h> unconditionally uses <netipx> headers
so they are still installed.  This needs to be dealt with.
2006-03-20 14:24:58 +00:00
Andrew Thompson
7afc53b8df Connect if_bridge to the build.
Approved by:	mlaier (mentor)
2005-06-05 03:32:53 +00:00
Brooks Davis
6c6faad6dd Remove bogus (but harmless) -I.. from CFLAGS. It makes no difference to
.depends other then the commant line.

Also remove -g from CFLAGS.  The user should add it to CFLAGS if they
desire debug support.

Reviewed by:	ru (in concept)
MFC After:	7 days
2005-03-25 22:08:59 +00:00
Gleb Smirnoff
a97719482d Add CARP (Common Address Redundancy Protocol), which allows multiple
hosts to share an IP address, providing high availability and load
balancing.

Original work on CARP done by Michael Shalayeff, with many
additions by Marco Pfatschbacher and Ryan McBride.

FreeBSD port done solely by Max Laier.

Patch by:	mlaier
Obtained from:	OpenBSD (mickey, mcbride)
2005-02-22 13:04:05 +00:00
Sam Leffler
5faf8dcb55 Overhaul to cleanup some of the tangled logic that's grown over the years.
o break per-address family support out into separate files
o modularize per-address family and functional operations using
  a registration mechanism; this permits configuration according
  to which files you include (but beware that order of the files
  is important to insure backwards compatibility)
o many cleanups to eliminate incestuous behaviour, global variables,
  and poor coding practices (still much more to fix)

The original motivation of this work was to support dynamic addition
of functionality based on the interface so we can eliminate the various
little control programs and so that vendors can distribute ifconfig
plugins that support their in-kernel code.  That work is still to be
completed.

o Update 802.11 support for all the new net80211 functionality; some
  of these operations (e.g. list *) may be better suited in a different
  program
2004-12-08 19:18:07 +00:00
Johan Karlsson
604d24db95 style.Makefile(5):
Use WARNS?= instead of WARNS=.
2004-02-23 20:25:27 +00:00
Robert Watson
2d58d642d2 Teach ifconfig(8) how to print and set the MAC labels on network
interfaces using the 'mac' argument.  Without MAC support in the
kernel, this does not change the behavior of ifconfig.

Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-23 03:40:47 +00:00
Luigi Rizzo
535862401b Do not disable IPv6 and vlan support when RELEASE_CRUNCH is defined.
We do support already IPv6 in the RELENG_4 boot floppies, and
vlan might be desirable as well.
2002-02-15 03:57:06 +00:00
Mike Barcroft
0db65eda3e Move the WARNS attribute down so that it also applies to the
RELEASE_CRUNCH case.
2001-12-05 02:29:23 +00:00
David E. O'Brien
2d68bf45bf Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by:	mike
2001-12-04 02:19:58 +00:00
Dima Dorfman
f328d583a2 Use CFLAGS, not COPTS, in the Makefile. bsd.prog.mk conveniently adds
COPTS towards the end of final CFLAGS so that it can be used to
override Makefile and other defaults.  Using it in Makefiles risks
having options set using it clobbered when somebody uses it on the
command line.

Approved by:	bde
2001-09-05 20:10:59 +00:00
David E. O'Brien
b5cd49315a Dike out the IPX bits if RELEASE_CRUNCH is defined. 2001-07-21 00:35:11 +00:00
Poul-Henning Kamp
419d8080a4 Currently, each wireless networking driver has it's own control program
despite the fact that most people want to set exactly the same settings
regardless of which card they have.  It has been repeatidly suggested
that this configuration should be done via ifconfig.  This patch
implements the required functionality in ifconfig and add support to the
wi and an drivers.  It also provides partial, untested support for the
awi driver.

PR:		25577
Submitted by:	Brooks Davis <brooks@one-eyed-alien.net>
2001-05-26 09:27:08 +00:00
Ruslan Ermilov
0a5779d45b - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:33:27 +00:00
Ruslan Ermilov
fe655281c5 Set the default manual section for sbin/ to 8. 2001-03-20 18:13:31 +00:00
Luigi Rizzo
ee7b8babab remove an undefined reference when no VLAN support is compiled in. 2000-11-30 21:35:09 +00:00
Yoshinobu Inoue
57a40e9ee7 Enable INET6 by default.
This should be OK on non INET6 enabled kernel.
1999-12-15 05:13:22 +00:00
Yoshinobu Inoue
cfa1ca9dfa udp IPv6 support, IPv6/IPv4 tunneling support in kernel,
packet divert at kernel for IPv6/IPv4 translater daemon

This includes queue related patch submitted by jburkhol@home.com.

Submitted by: queue related patch from jburkhol@home.com
Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project
1999-12-07 17:39:16 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Bill Paul
97ed1257f9 Grrr... botched remote commit. Let's try this again: vlan updates,
take two.
1999-03-15 01:22:01 +00:00