Commit Graph

40 Commits

Author SHA1 Message Date
ad f474dceb13 Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
kardel de4337ab21 merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html
2006-06-07 22:33:33 +00:00
liamjfoy 4876c304b1 Integrate Common Address Redundancy Procotol (CARP) from OpenBSD
'pseudo-device	carp'

Thanks to: joerg@ christos@ riz@ and others who tested
Ok: core@
2006-05-18 09:05:49 +00:00
elad 874fef3711 integrate kauth. 2006-05-14 21:19:33 +00:00
christos 4dde6a6d1b Make sure that breq is also cleared (from Xin LI) 2006-01-17 13:23:02 +00:00
christos 1482d7ce1c Make sure we initialize all structs to 0; from Xin LI 2006-01-09 13:04:38 +00:00
perry 0f0296d88a Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:45:08 +00:00
thorpej 63eac52bac ANSI function decls and application of static. 2005-12-11 23:05:24 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
jdc 9e2e82eb16 Fix this properly by renaming the conflicting variables. 2005-06-01 19:45:34 +00:00
jdc ee08c5a2f0 Remove extraneous definition of struct llc (found by shadow warning). 2005-06-01 19:38:13 +00:00
perry f07677dd81 nuke trailing whitespace 2005-02-26 22:45:09 +00:00
kim c9f56c04dc Add RFC 3378 EtherIP support, ported from OpenBSD to NetBSD by
Hans Rosenfeld (rosenfeld at grumpf.hope-2000.org)

This change makes it possible to add gif interfaces to bridges, which
will then send and receive IP protocol 97 packets. Packets are Ethernet
frames with an EtherIP header prepended.
2005-01-31 23:49:36 +00:00
peter b9c49ebff1 Change ifc_destroy to return an int instead of void, so that it
can pass back errors to ifconfig.
2004-12-04 18:31:43 +00:00
bad 2a256a96ac Interfaces that do checksum offloading indicate the checksum status of
received packets in csum_flags in the packet header.  Packets that are
forwarded over the bridge need to have csum_flags cleared before being
put on the output queue.  Do so in bridge_enqueue().

Discussed with Jason Thorpe.

Fixes PR kern/27007 and the first part of PR kern/21831.
2004-10-06 10:01:00 +00:00
christos 557877d024 Only enable BRIDGE_IPF code if PFIL_HOOKS is enabled. 2004-10-05 03:36:45 +00:00
itojun d6c33e0ef5 kill a sprintf 2004-04-21 19:10:31 +00:00
itojun d2f1c029b9 kill sprintf, use snprintf 2004-04-21 18:40:37 +00:00
jdc 99807188f8 Use m_copydata(), m_adj() and M_PREPEND() to manipulate mbuf's in
bridge_ipf().  Fixes kernel memory corruption that occured when using
m_split() and m_cat().
Idea from OpenBSD.
2004-01-31 20:11:13 +00:00
augustss e58307e458 Fix spelling mistake in a comment. 2003-12-09 19:33:22 +00:00
mycroft 8785679414 Mark this initializer in the canonical way so it can be found later. 2003-10-28 22:31:12 +00:00
christos 125ccd91b1 Fix uninitialized variable warnings 2003-10-25 18:29:12 +00:00
jdc 32263965e2 Add a flag parameter to bridge_enqueue() to tell it whether to run the
filter or not.  We only need to run the filter for bridge_forward() and
bridge_broadcast().  If we also run it for bridge_output(), we will run
the filter twice outbound per packet, so don't.

In bridge_ipf(), make sure we don't run m_cat() on a single mbuf chain
by checking to see (and remembering) if we need to m_split() the mbuf.
This fixes bridge + ipfilter on sparc.

Fixes PR kern/22063.
2003-09-16 17:37:27 +00:00
itojun 497e73e9cf rm extra blank line 2003-08-11 15:14:16 +00:00
jdc e8e38ce54c Include opt_inet.h to get INET6 definition.
Now, bridged ipv6 packets are passed through ipfilter.
However, some v6 packets still do not get transmitted when ipf is enabled.
Partial fix for PR kern/22063.
2003-07-13 08:51:36 +00:00
martin d505b18964 Make sure to include opt_foo.h if a defflag option FOO is used. 2003-06-23 11:00:59 +00:00
kristerw dcfad96372 Make sure splx() is called for all bridge_ioctl() error cases. 2003-05-24 14:22:14 +00:00
itojun 4008ec1218 use strlcpy 2003-05-16 03:56:49 +00:00
itojun b4542a20a6 use arc4random 2003-05-14 23:16:44 +00:00
bouyer 4a3c894eef Fix 2 bugs:
- initialise stp when the bridge is turned up, without this stp will keep
  all interfaces disabled in a sequence like:
  brconfig bridge0 add if0 add if1 stp if0 stp if1 up
- s/BRDGSPRI/BRDGSIFPRIO in brconfig.c:cmd_ifpriority()

add a command (ifpathcost) to change the stp path cost of the STP path cost of
an interface. Display the interface path cost with the others STP parameters.
2003-03-19 10:34:33 +00:00
perseant eab869e1c0 Make BRIDGE_IPF an option, and document it. Add it (commented) to GENERIC.
Let brconfig tell whether the bridge is using the ipfilter hook, or not.
2003-02-27 19:22:36 +00:00
perseant 6b857c229e Add ipf packet-filtering option to if_bridge. The option is controlled at
compile-time by BRIDGE_IPF, and at runtime by brconfig with the {ipf,-ipf}
option on a per-bridge basis.

As a side-effect, add PFIL_HOOKS processing to if_bridge.
2003-02-15 00:46:30 +00:00
martin f54ddc3c17 Add a function to lookup bridge members by struct ifnet * and use
it at all call sites that have such a pointer readily available.
This avoids unnecessary strcmp()s in critical paths, and removes
some XXX comments.
2002-08-24 19:00:31 +00:00
itojun a636441cdc reject "add" request if if_mtu is different. 2002-06-08 23:17:01 +00:00
itojun d64426f359 use IFT_BRIDGE 2002-05-23 06:19:39 +00:00
jdolecek d1f2e630ca Fix a memory leak in bridge_ioctl_add() when the called for non-ethernet
interface.
Problem noted and fix provided by in kern/16019 by Love.
2002-03-24 16:11:23 +00:00
thorpej a180cee23b Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.
2002-03-08 20:48:27 +00:00
lukem 34d65a3414 add RCSIDs 2001-11-12 23:49:33 +00:00
thorpej 9b50223a16 Only report expire time for DYNAMIC forwarding table entries. 2001-08-17 22:10:20 +00:00
thorpej 460da35f85 Add support for building Ethernet bridges, based on Jason Wright's
bridge driver from OpenBSD, although the bridge code has been *heavily*
modified by me (the 802.1D code remains mostly unchanged from the
original).
2001-08-17 21:37:27 +00:00