Commit Graph

228 Commits

Author SHA1 Message Date
Andrew Thompson
5090437236 Change wpa_supplicant to down the interface at the start of the init routine.
wpa_supplicant expects that it has exclusive access to the net80211 state so
when its starts poking in the WEP/WPA settings and the card is already
scanning it can cause net80211 to try and associate incorrectly with a
protected AP.

This is an inconvenience for firmware based cards such as iwi where it can be
sent an auth instruction with incomplete security info and cause a firmware
error.

Remove the 'ifconfig up' from network.subr since wpa_supplicant will
immediately down the interface again.

Reported by:	Guy Helmer (and others)
Reviewed by:	sam, brooks, avatar
MFC after:	3 days
2007-11-05 06:13:07 +00:00
Andrew Thompson
ddf1c6facd Do not attempt to load the kernel module when checking if an interface exists.
This would cause pseudo network modules to be reloaded again when trying to
unload the first time if any cloned interfaces exist.

MFC after:	2 weeks
2007-05-23 00:18:44 +00:00
Andrey A. Chernov
e8670c2c4e Back out network.subr :- fix and comment out dhc*_fxp0 examples instead
Submitted by:   jhb
2007-03-29 21:42:19 +00:00
Andrey A. Chernov
2395c8cbfc Fix get_if_var() with 3 args (i.e. with default)
All xxx_<ifname> flags are set to empty strings automatically earlier so
eval echo \${${prefix}${_if}${suffix}-${_default}}
not substitute the default but return just the empty string.
Fix it using
eval echo \${${prefix}${_if}${suffix}:-${_default}}
(i.e. treat empty strings as unset)

The bug manifistates itself with the following warning from checkyesno():
/etc/rc.d/dhclient: WARNING: $background_dhclient is not set properly -
see rc.conf(5)
2007-03-29 10:55:33 +00:00
Florent Thoumie
2d69b43eb2 Add support for EtherChannel configuration to rc startup scripts.
Note: This also deprecates "NO" as a way to specify an empty list of
interfaces for gif_interfaces.

PR:		conf/104884
Submitted by:	nork
Harassed by:	brd
Discussed with:	brooks, dougb
2007-02-09 12:11:27 +00:00
Max Laier
51769ee611 Do not try to rtsol on pflog or pfsync devices. 2006-10-29 13:29:49 +00:00
Hajimu UMEMOTO
639b2c8e5a Restore the behavior that net.inet6.ip6.auto_linklocal=0 could
be coexist with ipv6_enable="YES".

MFC after:	3 days
2006-10-07 15:45:56 +00:00
George V. Neville-Neil
90ce6fa1c8 Turn off automatic link local address if ipv6_enable is not set to YES
in rc.conf

Reviewed by:    KAME core team, cperciva
MFC after:      3 days
2006-10-02 10:13:30 +00:00
Brooks Davis
6da9aa1452 Introduce a new method ipv6if which attemptes to figure out if an
interface is an IPv6 interface.

Use this method to decide if we should attempt to configure an interface
with an IPv6 address in pccard_ether.  The mechanism pccard_ether uses
to do this is unsuited to the task because it assumes the list of
interfaces it is passed is the full list of IPv6 interfaces and makes
decissions based on that.  This is at least a step in the right
direction and is probably about as much as we can MFC safely.

PR:		conf/103428
MFC after:	3 days
2006-09-21 01:44:52 +00:00
Brooks Davis
4e7ff69a4c Introduce a new function, ifexists and use it to avoid attempting to
touch interfaces that don't actually exist in the stop case.  In the
process move some IPv4 specific code from ifconfig_down to ipv4_down.

This should solve problems with ifconfig: error messages on boot when
interfaces are renamed.
2006-08-17 03:03:38 +00:00
Brooks Davis
c1ba2105e8 Spell synchronous with required silent 'h'.
Reported by:	ru, ceri
Pointy hat:	brooks
2006-04-13 18:34:14 +00:00
Brooks Davis
ebd1e9136f Add missing _ to $_punct.
Submitted by:	Dmitry Pryanishnikov <dmitry at atlantis.dp.ua>
2006-04-13 18:27:49 +00:00
Brooks Davis
c4af136d49 Commit the various network interface configutation updates I've been
working on.
  1) Make it possible to configure interfaces with certain characters in
     their names that aren't valid in shell variables.  Currently supported
     characters are ".-/+".  They are converted into '_' characters.
  2) Replace nearly all eval statements in network.subr with a new
     function get_if_var which substitues an interface name (after the
     translations above) for "IF" in a variable name.
  3) Fix list_net_interfaces() in the nodhcp case.
  4) Allow the administrator to specify if dhclient should be started
     when /etc/rc.d/netif configures the interface or only by devd.
     This can be set on both a per interface and system wide basis.

PR:	conf/88974 [1,2], conf/92433 [1,2]
2006-04-13 06:50:46 +00:00
Brooks Davis
cda39c0193 Add a new configuration variable, ipv4_addrs_<ifn>, which adds one or
more IPv4 address from a ranged list in CIRD notation:

ipv4_addrs_ed0="192.168.0.1/24 192.168.1.1-5/28"

In the process move alias processing into new ipv4_up/down functions to
more toward a less IPv4 centric world.

Submitted by:	Philipp Wuensche <cryx dash freebsd at h3q dot com>
2005-11-14 23:34:50 +00:00
Brooks Davis
2b32284f18 - Alwasy explicitly bring the interface up before configuring it.
- If an interface's ifconfig_<ifn> is set, but empty, don't set it to
   ifconfig_DEFAULT.  This way interfaces can be disabled even in the
   presence of ifconfig_DEFAULT.
 - When listing interfaces and network_interfaces=auto, place lo0 first
   if it's around.
2005-09-02 17:11:13 +00:00
Brooks Davis
815e43db38 Support ifconfig_<ifn> variables containing quoted variables with spaces
in them by wrapping the ifconfig command with eval "...".

For example, this allows:

ifconfig_iwi0="DHCP ssid 'foo bar baz'"
2005-08-26 04:06:17 +00:00
Brooks Davis
41f7ee42ae - Remove the removable_interfaces variable. /etc/pccard_ether will
now run on any interface.
- Add a new ifconfig_<ifn> keyword, NOAUTO which prevents configuration
  of an interface at boot or via /etc/pccard_ether.  This allows
  /etc/rc.d/netif to be used to start and stop an interface on a purely
  manual basis.  The decision to affect pccard_ether may be revisited at
  a later date.

Requested by:	imp, gallatin (removable_interfaces)
Discussed with:	sam, Randy Bush (NOAUTO)
2005-08-24 01:23:49 +00:00
Brooks Davis
7657f59596 - Remove the pccard_ifconfig variable in favor of a new
ifconfig_DEFAULT variable.  Unlike pccard_ifconfig, ifconfig_DEFAULT
   applies to all interfaces that do not specify an ifconfig_<ifn>
   variable rather than just those listed in removable_interfaces.
 - Correct the list of interfaces when network_interfaces and
   removable_interfaces are both set by including removable_interfaces
   in the list of canidates.
 - When listing dhcp interfaces, include those with other ifconfig
   options so nat works.

Approved by:	re (network interface startup blanket)
2005-06-30 05:02:34 +00:00
Brooks Davis
a7e55c1e77 Add support for starting wpa_supplicant by adding the WPA keyword to an
interface's ifconfig_<ifn> entry in /etc/rc.conf.

Approved by:	re (network interface startup blanket)
2005-06-30 04:52:47 +00:00
Brooks Davis
cbac4adce6 Fix return values of ifconfig_up/down.
Reported by:	Andrea Campi
2005-06-07 23:59:45 +00:00
Brooks Davis
8e9e71f817 Support code for the OpenBSD dhclient. This significantly changes the
way interfaces are configured.  Some key points:

  - At startup, all interfaces are configured through /etc/rc.d/netif.
  - ifconfig_<if> variables my now mix real ifconfig commands the with
    DHCP and WPA directives.  For example, this allows media
    configuration prior to running dhclient.
  - /etc/rc.d/dhclient is not run at startup except by netif to start
    dhclient on specific interfaces.
  - /etc/pccard_ether calls "/etc/rc.d/netif start <if>" to do most of
    it's work.
  - /etc/pccard_ether no longer takes additional arguments to pass to
    ifconfig.  Instead, ifconfig_<if> variables are now honored in favor
    of pccard_ifconfig when available.
  - /etc/pccard_ether will only run on interfaces specified in
    removable_interfaces, even if pccard_ifconfig is set.
2005-06-07 04:49:12 +00:00
Pawel Jakub Dawidek
bb28d112bb 'all' argument for list_net_interfaces() is now unused, remove it. 2004-12-05 21:45:36 +00:00
Ralf S. Engelschall
18c3f40e94 Use "ifconfig -l" instead of "list_network_interfaces all" in
ifnet_rename() to support situations where rc.conf's $network_interfaces
variable is set to an explicit list of network interfaces (instead of
the default "auto").

Using "list_network_interfaces all" resulted in using
$network_interfaces for both interface _renaming_ and interface
_configuration_ which obviously cannot work either before (if the
new name is in $network_interfaces) or after (if the old name is in
$network_interfaces) renaming the interface.
2004-12-05 09:51:48 +00:00
Ralf S. Engelschall
9edbeba781 fix typo: s/intefraces/interfaces/ 2004-12-05 09:01:20 +00:00
Pawel Jakub Dawidek
1f8197cf4d Allow to change interfaces name on boot time.
Now, one should be able to put something like this into /etc/rc.conf:

	ifconfig_fxp0_name="net0"
	ifconfig_net0="inet 10.0.0.1/16"

Reviewed by:	green
2004-10-30 13:44:06 +00:00
Yaroslav Tykhiy
cd9d7d4d0c Avoid double appearing of cloned interfaces in the output
from list_net_interfaces() when network_interfaces=auto.

Rationale: Since the auto case is special, the lesser evil
had to be chosen among not adding cloned interfaces to
_tmplist or removing duplicates from _tmplist after adding
cloned interfaces.  Since list_net_interfaces() must not use
/usr/bin tools, the former "evil" appeared clearer and much
more efficient.  (See the PR audit trail for discussion.)

PR:		conf/63700
Reviewed by:	brooks
MFC after:	5 days
2004-08-28 07:58:02 +00:00
Yaroslav Tykhiy
044d85099a Fix a typo in a variable name. 2004-08-27 12:11:47 +00:00
Jens Schweikhardt
d8beb0fd3b Removed whitespace at BOF, EOL & EOF. 2004-06-06 11:46:29 +00:00
Martin Blapp
d10526a03b Improve the handling dhcp handling of pccard_ether.
There are now many configurations which have a NIC on board, and
pccard slots. If a dhclient is running on the internal nic, the
Improve the handling dhcp handling of pccard_ether.

Improve the dhcp handling of pccard_ether.

There are now many configurations which have a NIC on board and
Improve the dhcp handling of pccard_ether.

There are now many configurations which have a NIC on board and
cardbus slots too. If a dhclient was already running on the internal
NIC, the user was forced to kill a running dhclient manually.

If now a pccard is included at startup time, /etc/rc.d/dhclient
start does include it into the startup list for dhcp devices.
That means you can now do dhcp on the internal and the pccard devices
at the same time. If the card is plugged in later, a running dhclient
(working for the internal interface only) is killed, and restarted,
but the interface name of the new pccard is added to the internal
name. After removal, /etc/rc.d/dhclient is started again. This
script does nothing if there are no devices in /etc/rc.conf

This is only a workaround for a well known problem. After we have
a dhcp client which handles device adding and removal, it will go
away.
2003-08-11 20:32:00 +00:00
Hajimu UMEMOTO
c8d9e00aca add rtsol_flags.
MFC after:	1 week
2003-08-08 17:43:58 +00:00
Jun Kuriyama
7e025e0506 Check by [ $? -eq 0 ] rather than $?.
Reviewed by:	mtm
2003-06-24 03:55:21 +00:00
Mike Makonnen
b981655c08 o Fix a typo
o Fill in the ipx_down() routine.

Submitted by: ceri
2003-06-09 17:34:31 +00:00
Mike Makonnen
991ce918f2 - Remove a debugging echo.
- When we change the IFS make sure to return it to its previous
  value before executing a command.
2003-06-08 11:49:30 +00:00
Mike Makonnen
8ee6ed40d1 Implement *_down network routines for ifconfig'ed interfaces, cloned
interfaces, interface aliases, user supplied ifconfig scripts, and
ipx interfaces. The ipx routine fails unconditionaly at the moment.
Someone who has a need for it can fill it in with the appropriate incantations.
2003-06-08 10:34:40 +00:00
Hajimu UMEMOTO
bcd1e80f87 pccard_ether didn't setup IPv6 after rcTOS sweep.
Reviewed by:	mtm and dougb
Approved by:	re (scott)
2003-05-12 11:36:50 +00:00
Mike Makonnen
8b3695ab45 Break out and rewrite the network setup scripts.
o /etc/network.subr contains common subroutines used for seting
	  up network interfaces
	o rc.d/hostname sets the hostname if not already set
	o rc.d/nisdomain sets the nis domain *after* rpcbind but
	  before the yp* daemons. This fixes issues with temporary
	  hangs when looking up informaion in nis before it's ready.
	o rc.d/netif brings network interfaces (minus dhcp)  up.
	o rc.d/network1 has been disabled and will be retired before
	  RELENG_5. It will be replaced by rc.d/netif

Approved by:	markm (mentor)
2003-04-18 17:51:54 +00:00
Warner Losh
c42073b2d4 Back out 1.143 and 1.144. They are no longer needed now that we start
devd later in the boot process.  This should fix all the problems
people have had with those commits.  Diskless should be working again,
and those that mount /usr with nfs should be able to do that again too.
2003-02-12 04:26:10 +00:00
Warner Losh
96ac3c4b16 o Don't consider LOOPBACK devices as configured... 2002-12-13 23:36:31 +00:00
Warner Losh
c9e1bbfb91 o redirect the grep to /dev/null
o use ifn rather than interface in rc.network
o merge into rc.d/network1

Approved by: (re blanket)
2002-12-12 09:31:10 +00:00
Jens Schweikhardt
143085107b Fix style bugs:
* Space -> tabs conversion.
* Removed blanks before semicolon in "if ... ; then".
* Proper indentation of misindented lines.
* Put a full stop after some comments.
* Removed whitespace at end of line.

Approved by:	silence from gordon
2002-10-12 10:31:31 +00:00
Hajimu UMEMOTO
a75d520e1f up gif during setup. 2002-09-20 18:31:55 +00:00
Gordon Tetlow
e4bc448975 Correct comment
Submitted by:	Mike Makonnen <makonnen@pacbell.net>
2002-08-09 17:33:07 +00:00
Dima Dorfman
dacf6a1e22 Remove spurious "echo '.'". 2002-07-18 05:00:23 +00:00
Doug Barton
de66529e70 Make nisdomainname=NO DTRT
Submitted by:   des, via Mike Makonnen <makonnen@pacbell.net>
2002-07-18 05:00:20 +00:00
Doug Barton
4264c30c0d Cleanup some pollution from the NetBSD sync, and add gif setup.
Submitted by:   Mike Makonnen <makonnen@pacbell.net>
2002-07-18 05:00:19 +00:00
Gordon Tetlow
8abdee58c7 Fix a typo that caused dhclient not to work.
Submitted by:   Dennis Kristensen <snicki@snicki.dk>
Reviewed by:    Mike Makonnen <makonnen@pacbell.net>
2002-07-18 05:00:18 +00:00
Gordon Tetlow
242bd45fb4 Merge in all the changes that Mike Makonnen has been maintaining for a
while. This is only the script pieces, the glue for the build comes next.

Submitted by:   Mike Makonnen <makonnen@pacbell.net>
Reviewed by:    silence on -current and -hackers
Prodded by:     rwatson
2002-07-18 05:00:17 +00:00
Dag-Erling Smørgrav
cec161f9e1 Cosmetic changes to the previous commit, bringing it closer to what I
already had in my tree but didn't want to commit.
2002-04-11 22:06:27 +00:00
Peter Wemm
6636027fe4 Since sshd expects /etc/ssh/ssh_host_rsa_key to exist, we had better
create it.  Also specify protocol v1/v2 in case people wonder why we
generate two RSA keys.
2002-04-10 22:30:54 +00:00
Doug Barton
41cf829909 The good news is that my initial PR was correct... the bad news is that I
was apparently smoking something when I committed the last fix, because as
ume was kindly enough to set me straight on, amd *will* start with no
arguments at all, as long as there is an /etc/amd.conf file for it to
read. What it won't do is start with *just* -p.

In any case, now it's fixed.
2002-04-01 18:33:45 +00:00
Dag-Erling Smørgrav
dde1888c4a Don't try to generate ssh keys if ssh isn't installed. 2002-03-19 03:45:02 +00:00
Crist J. Clark
5b7e37d2b7 IPFilter may need to be re-sync'ed even if we are not filtering, but
only doing ipnat(8). Go back to using $ipfilter_active, but turn off
$ipfilter_active when loading ipl.ko has failed.

Submitted by:	devet@devet.org (Arjan de Vet)
MFC after:	3 days
2002-03-19 01:56:04 +00:00
Doug Barton
4072b4a6a1 Answer the question posed in 1.126. amd won't start without either a
conf file, or command line options. I brought this up in PR 12432,
which (ironically) obrien assigned to me after I became a committer. :)

PR:		conf/12432
Submitted by:	Me
2002-03-17 07:35:51 +00:00
Crist J. Clark
7a82d7421f The reload of ipf(8) rules should depend on $ipfilter_enable, not
$ipfilter_active. $ipfilter_enable is set to "NO" if modules fail to
load, and $ipfilter_active can be "YES" when we are not using ipf(8).

MFC after:	3 days
2002-03-12 20:25:25 +00:00
David E. O'Brien
3cbb824a64 Background the startup of `Amd', it often blocks on startup. 2002-03-12 01:04:35 +00:00
David E. O'Brien
ec6a10cd53 Why shouldn't amd always write its PID to a file?
Since I cannot answer that question, make it.
2002-03-12 01:01:53 +00:00
Dima Dorfman
1998c28f48 Redirect stdout of `ipf -y' to /dev/null. This removes a stray
"filter sync'd" in the middle of the boot output if IPFilter is
enabled, but does not hide any potential errors, which go to stderr.
2002-03-04 10:30:24 +00:00
Crist J. Clark
29c0f078e2 There is no reason to demand the administrator set 'natd_interface'
when running natd(8) out of the rc-files. It is perfectly valid for
the interface or alias address to be set in a natd(8) configuration
file, not on the command line. Also, loosen up the restrictions on
identifying an IP address argument in 'natd_interface.'

Fix the documentation, rc.conf(5), to reflect this change.

Take the bogus default for 'natd_interface' out of /etc/defaults/rc.conf.

MFC after:	3 days
2002-02-20 10:31:01 +00:00
Crist J. Clark
36a48df48e peter points out that we probably should not mess with the sysctl(8)
values at all if they are not purposefully set. What if the
administrator messed with them in /etc/sysctl.conf? We don't want to
overwrite them.

If 'log_in_vain' is zero, do not force the issue. If it is non-zero,
set it.
2002-02-08 13:25:33 +00:00
Sheldon Hearn
3e38757beb Register amd's dependency on NFS.
This change was submitted to the freebsd-audit mailing list for review
but received no feedback.  Hindsight-enabled reviews are welcome.

PR:		conf/31358
Submitted:	Thomas Quinot <thomas@cuivre.fr.eu.org>
2002-01-28 11:05:01 +00:00
Crist J. Clark
f44609fe71 Make the rc.conf(5) 'log_in_vain' knob an integer.
Try this out in -CURRENT, MFC, and then consider dropping the
'log_in_vain' knob all together. It really is something for
sysctl.conf(5).

PR:		bin/32953
Reviewed by:	-bugs discussion
MFC after:	1 week
2002-01-26 09:05:13 +00:00
Alfred Perlstein
bcb733d069 rpc.lockd needs rpc.statd to be running for it to start up properly.
so swap the order.

Also allow rpc.lockd and rpc.statd to be turned on if nfsclient is
enabled.  They are needed to provide client side locking support.

PR: conf/27811
2001-12-13 04:21:18 +00:00
Ruslan Ermilov
d4d2e898a1 s/sysctl -w/sysctl/ 2001-12-11 08:21:46 +00:00
Robert Watson
67b86547da o Update rc.network to reflect the recent change of default in the
kernel TCP timer code: rather than checking for tcp_keepalive being
  set to "YES", check for "NO" and turn off keepalives if the variable
  is set in that manner.

o Note: eventually, it would make sense to remove this variable from
  rc.conf management, and instead rely on sysctl.conf.  In fact, this
  is probably true of a number of rc.conf variables whose sole aim
  is to drive the setting of sysctls at boot time.
2001-12-07 17:03:14 +00:00
Crist J. Clark
68f1d5a354 Protect the '*' in pppoed_provider (the default) from metacharacter
expansion in the rc-scripts.

PR:		32552
Submitted by:	Gleb Smirnoff <glebius@rinet.ru>
Approved by:	ru
Obtained from:	ru
MFC after:	1 day
2001-12-06 09:34:44 +00:00
Dima Dorfman
a48060a2f7 Spelling police: sucessful -> successful. 2001-11-24 23:41:32 +00:00
Darren Reed
c05c122c97 Resolve all the ipfilter startup issues in rc.network with one big patch
to get it all right, allowing ipnat to be enabled independantly of ipfilter
in rc.conf (among other things).

PR:		multiple
Submitted by:	Arjan de Vet <devet@devet.org>
Reviewed by:	Giorgos Keramidas <keramida@FreeBSD.org>
2001-11-24 13:48:30 +00:00
Sheldon Hearn
ce76d9c108 Avoid unnecessary calls to expr(1) by using standard shell arithmetic
expansion instead.
2001-11-14 06:35:43 +00:00
Bill Fenner
85c9d676b5 Update the nsswitch.conf -> host.conf generator to handle criteria,
continuation lines, extra whitespace, and to use the last matching
 line in the file.  This syncs the host.conf generation with how
 the nsswitch.conf is parsed.
Only print " host.conf" instead of a multi-line message, since this
 happens on every boot.
2001-11-07 00:33:56 +00:00
Dag-Erling Smørgrav
bd0a2a3f93 Modify the way host.conf and nsswitch.conf are treated at boot time:
- if nsswitch.conf exists, host.conf is auto-generated for compatibility
   with legacy applications and libraries.

 - if host.conf exists but nsswitch.conf does not, nsswitch.conf is auto-
   generated as usual.
2001-11-01 12:39:01 +00:00
Darren Reed
f645349388 Do an ipf -y after bringing up ppp to ensure rules which mention ppp get
matched.  Moification on PR to handle ipnat not being dependant on
ipfilter_enable

PR:	22859
2001-10-20 04:46:32 +00:00
Darren Reed
9645656d2c Allow ipnat_enable to be set to "yes" without requiring ipfiltre_enable to
be set to "yes"

PR:		25223
2001-10-20 04:41:47 +00:00
Darren Reed
639e6db6e7 Put in place for using ipfs use on shutdown and startup.
PR:		27070
2001-10-20 04:33:02 +00:00
Doug Barton
74e07b9e48 Handle the lack of nfs server or client support in the kernel by
kldload'ing the appropriate modules before enabling the service.
2001-10-19 06:50:52 +00:00
John Baldwin
19d1491b60 Remove references to nfsiod and nfs_client_flags now that they are
obsolete.

Submitted by:	Gordon Tetlow <gordont@gnf.org>
2001-10-10 20:36:51 +00:00
Brooks Davis
40995998c5 Add a new rc.conf variable, cloned_interfaces, to create cloned
interfaces at boot.
2001-09-19 21:27:27 +00:00
Peter Wemm
06fec2cf89 The vfs.nfs.bufpackets sysctl is in the client, not the server. Move it
to the client section.  Turn off nfsiod, it no longer exists (now just
kthreads).  I need revisit nfsiod so that we have an argument passthrough.
2001-09-19 00:22:26 +00:00
Darren Reed
e58f466620 Merge in patch to automagically decide whether or not a kldload of ipfilter
is required into rc.network.

Person failed to use a real name so both email addresses from PR included
(Sent was different to From).

PR:		22998
Submitted by:	dl@leo.org/spock@empire.trek.org
2001-07-30 23:12:02 +00:00
Mark Murray
e7f2f42f1b Upgraded launchpad for kerberos. Noe kerberos IV OR kerberos 5
may be started at boot for kerberos servers.
2001-07-28 19:57:57 +00:00
Brooks Davis
cdb5d37b3e Create gif devices in the "gifconfig" stage while configuring them.
Reviewed by:	ru, ume
Obtained from:	NetBSD
MFC after:	1 week
2001-07-02 21:08:48 +00:00
Jens Schweikhardt
03f80507e5 Fix misindented esac.
MFC after:	1 week
2001-06-16 15:48:43 +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
Brian Somers
4524e002f7 Add a missing \n
Submitted by:	Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
PR:		28014
MFC after:	1 week
2001-06-10 16:21:56 +00:00
Brian Somers
c34b6be0cd Move gif_interfaces from an IP6 option to a regular IP option.
PR:		26543
Submitted by:	Brooks Davis <brooks@one-eyed-alien.net>
MFC after:	3 weeks
2001-06-03 12:26:56 +00:00
David E. O'Brien
d3ebe37cd0 Restore the RSA host key to /etc/ssh/ssh_host_key.
Also fix $FreeBSD$ spamage in crypto/openssh/sshd_config rev. 1.16.
2001-05-18 18:10:02 +00:00
Jesper Skriver
b10cf90768 Link /etc/ssh/ssh_host_key to /etc/ssh/ssh_host_rsa_key to deal with
gratutious changes in the latest SSH

Reviewed by:	obrien
Approved by:	obrien
2001-05-16 19:23:54 +00:00
Peter Wemm
b7c90f028d s/ssh_host_key/ssh_host_rsa_key/ since that is what openssh uses now
after a mergemaster.
2001-05-09 07:46:44 +00:00
Dag-Erling Smørgrav
cc084f7587 Axe TCP_RESTRICT_RST. It was never a particularly good idea except for a few
very specific scenarios, and now that we have had net.inet.tcp.blackhole for
quite some time there is really no reason to use it any more.

(second of three commits)
2001-03-19 22:07:32 +00:00
Alfred Perlstein
8360efbd6c Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) and
associated changes that had to happen to make this possible as well as
bugs fixed along the way.

  Bring in required TLI library routines to support this.

  Since we don't support TLI we've essentially copied what NetBSD
  has done, adding a thin layer to emulate direct the TLI calls
  into BSD socket calls.

  This is mostly from Sun's tirpc release that was made in 1994,
  however some fixes were backported from the 1999 release (supposedly
  only made available after this porting effort was underway).

  The submitter has agreed to continue on and bring us up to the
  1999 release.

  Several key features are introduced with this update:
    Client calls are thread safe. (1999 code has server side thread
    safe)
    Updated, a more modern interface.

  Many userland updates were done to bring the code up to par with
  the recent RPC API.

  There is an update to the pthreads library, a function
  pthread_main_np() was added to emulate a function of Sun's threads
  library.

  While we're at it, bring in NetBSD's lockd, it's been far too
  long of a wait.

  New rpcbind(8) replaces portmap(8) (supporting communication over
  an authenticated Unix-domain socket, and by default only allowing
  set and unset requests over that channel). It's much more secure
  than the old portmapper.

  Umount(8), mountd(8), mount_nfs(8), nfsd(8) have also been upgraded
  to support TI-RPC and to support IPV6.

  Umount(8) is also fixed to unmount pathnames longer than 80 chars,
  which are currently truncated by the Kernel statfs structure.

Submitted by: Martin Blapp <mb@imp.ch>
Manpage review: ru
Secure RPC implemented by: wpaul
2001-03-19 12:50:13 +00:00
Doug Barton
8f38f3b2e6 * Add an eval so that ipnat_flags=">/dev/null" works, per the PR
* Do some line length and specify full path cleanups while I'm here

PR:				conf/22937
Submitted by:	Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
2000-12-17 22:14:49 +00:00
Doug Barton
e14563a3f3 Apply a more consistent style to the echo statements in /etc/ scripts.
* Put quotes around each line
* Single quotes for lines with no variable interpolation
* Double quotes if there is
* Capitalize each word that begins a line
* Make echo -n 'Doing foo:' ... echo '.' more of a standard

No functionality changes
2000-12-17 08:16:06 +00:00
Ruslan Ermilov
35c8e6411c Fixed the reporting of ip_portrange_{first|last}. 2000-10-12 11:25:57 +00:00
David E. O'Brien
a1c43e3fbb Add copyright notices. Other systems have been barrowing our /etc files
w/o giving any credit.
2000-10-08 19:20:36 +00:00
Darren Reed
7a76642f3c This brings support for IP Filter into rc.network and rc.conf with
the appropriate documentation added to rc.conf(5).  If all goes well
with this over the next few weeks, the PR will be closed with the
pullup of patches back to 4-STABLE.

PR:		20202
Submitted by:	Gerhard Sittig <Gerhard.Sittig@gmx.net>
Reviewed by:	Darren Reed <darrenr@freebsd.org>
Approved by:	Darren Reed <darrenr@freebsd.org>
Obtained from:	Gerhard Sittig <Gerhard.Sittig@gmx.net>
2000-10-06 12:24:45 +00:00
Brian Somers
cd63d8618f Use su -m instead of just su to avoid reading the users login profile 2000-09-28 05:43:44 +00:00
Jacques Vidrine
248aee623c Add nsswitch support. By creating an /etc/nsswitch.conf file, you can
configure FreeBSD so that various databases such as passwd and group can be
looked up using flat files, NIS, or Hesiod.

= Hesiod has been added to libc (see hesiod(3)).

= A library routine for parsing nsswitch.conf and invoking callback
  functions as specified has been added to libc (see nsdispatch(3)).

= The following C library functions have been modified to use nsdispatch:
    . getgrent, getgrnam, getgrgid
    . getpwent, getpwnam, getpwuid
    . getusershell
    . getaddrinfo
    . gethostbyname, gethostbyname2, gethostbyaddr
    . getnetbyname, getnetbyaddr
    . getipnodebyname, getipnodebyaddr, getnodebyname, getnodebyaddr

= host.conf has been removed from src/etc.  rc.network has been modified
  to warn that host.conf is no longer used at boot time.  In addition, if
  there is a host.conf but no nsswitch.conf, the latter is created at boot
  time from the former.

Obtained from:	NetBSD
2000-09-06 18:16:48 +00:00
John Baldwin
bc19d0871a Fix a whitespace bogon. 2000-08-16 23:08:28 +00:00
Brian Somers
e2323071e6 Allow a ppp_user specification to run ppp at startup
PR:		20258
2000-08-10 00:13:02 +00:00
Neil Blakey-Milner
e3186dd555 Add to, don't overwrite, user-settable mountd_flags.
PR:		conf/15745
Submitted by:	Vivek Khera <khera@kciLink.com>
2000-07-14 13:03:36 +00:00
Matthew Dillon
55f087be8e Add ip_portrange_first and ip_portrange_last rc.conf/rc.network
options.  This allows you to set the standard dynamic port
    assignment range prior to any network daemons (like named) starting
    up, necessary if you are also using a firewall to restrict lower ports.
    will be MFC'd in a few days
2000-06-22 17:40:53 +00:00