Commit Graph

984 Commits

Author SHA1 Message Date
itojun f64f00cc3f need to protect if_attachdomain() too 2002-06-08 11:58:50 +00:00
itojun ad2c23cb75 protect dom_ifattach by splnet 2002-06-08 11:54:24 +00:00
wrstuden 9e2b945a7b defparam BPF_BUFSIZE 2002-06-06 23:54:47 +00:00
itojun fc6382d167 no need to set rmx_send/recvpipe. 2002-06-04 22:11:15 +00:00
itojun b1654995d0 add a blank line 2002-06-04 10:00:24 +00:00
itojun 87fc46bce9 improve nd6_setmtu(), to warn too-small MTU on SIOCSIFMTU. sync w/kame 2002-05-30 05:06:28 +00:00
christos ab57e25224 add 2 more CCP defines. 2002-05-29 19:11:05 +00:00
itojun eee0912fd7 don't panic on invalid CONF_ACK from remote (in general, issueing panic
on remote input is bad practice)
2002-05-29 01:38:46 +00:00
itojun ae5a9e211d re-scan all ifnet after domaininit() for if_afdata initialization. 2002-05-27 13:46:45 +00:00
itojun e5aa199677 framework to add af-dependent data structure to struct ifnet.
as discussed at bsd-api-discuss.  sync w/kame
2002-05-27 02:53:49 +00:00
matt 486c7ce727 Add SIOCGIFDATA and SIOCZIFDATA ioctl's to get interface data. (the Z
variant also zeroes the counters after copying them).  In ifunit, add
support for dealing all numeric ifname by treating them as an ifindex
which is used to look up the interface.
2002-05-23 21:34:39 +00:00
itojun d64426f359 use IFT_BRIDGE 2002-05-23 06:19:39 +00:00
itojun 754f309c32 add recently-added IANA values from http://www.iana.org/assignments/smi-numbers 2002-05-23 06:18:44 +00:00
itojun 1d8b891867 sync with KAME.
- make altq_etherclassify() able to handle packets whose ethernet header
  is in a separate mbuf.  closes netbsd PR 16559
2002-05-18 22:52:44 +00:00
haya 1ce4bf6bec Bugfix: s/__NetBSD_Version/__NetBSD_Version__/. IPv4 over IEEE 1394
will work with this change.
2002-05-16 09:08:33 +00:00
matt aefe6a5034 Eliminate common. 2002-05-13 23:50:32 +00:00
matt 2d83d27dfa Eliminate more commons. 2002-05-12 20:40:11 +00:00
matt 17b32e3800 Make ppp_softc[] extern and declare in if_ppp.c 2002-05-12 20:38:15 +00:00
tron 953a52bd9e Fix memory leak which occurs after an allocation failure. 2002-05-07 09:14:20 +00:00
martin 75a925b327 "if (debug)" some log messages not signaling real errors but happening
in normal operation.
2002-04-29 16:29:29 +00:00
enami 064142edd8 Use ETHER_HDR_LEN instead of 14. 2002-04-27 02:38:47 +00:00
martin e4998611e9 Fix copyright notice. 2002-04-14 12:24:26 +00:00
martin e9e3eb14ae XXX Explicitly make this fail to compile with a proper warning if we
do not have ARP configured.

This can be caused by configurations including bridge, ppppoe or vlan but
no ethernet interfaces - which does not make sense. We should add a way
to config(8) to issue this kind of warnings.
2002-04-07 07:05:37 +00:00
christos 5c8e181780 We are not guaranteed that we have enough bytes to get a struct ip from our
mbuf. So if we receive a short packet, that looks like gif we would panic.
Reviewed by thorpej, tested by Kimmo Suominen and Andreas Wrede. Thanks for
the help in tracking this down.
2002-03-26 16:05:03 +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
darrenr 726f1074d8 If someone is poll'ing to write to bpf, assume that it can always be done
and include POLLOUT and POLLWRNORM in the returned events flag set.
Derived from FreeBSD.
2002-03-23 15:55:21 +00:00
atatat 31144d9976 Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command".  ERESTART is -1, which can lead to
confusion.  ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4.  No ioctl code should now return -1 anywhere.  The
ioctl() system call is now properly restartable.
2002-03-17 19:40:26 +00:00
simonb dbafd8c6a6 Make the 'ifnet' variable an extern and declare it in if.c. 2002-03-17 10:21:42 +00:00
itojun 496665ab2c suppress -Wunused if !INET6 2002-03-13 06:43:18 +00:00
fvdl 8a9dc4a551 Fix what looks like a merge error: olen = 0 in z_decompress, not
PPP_HDRLEN, which caused lots of 'ppp_deflate0: exceeded mru (1508 > 1504)'
messages.
2002-03-13 04:04:00 +00:00
fvdl 21275ebab6 Upgrade this generated version to be based on zlib-1.1.4 2002-03-13 03:59:35 +00:00
onoe ca3afc880f fix CRC (ICV) for WEP: ICV is 32bit not 16bit.
(change from htole16 to htole32, so no changes for little endian machine)
2002-03-12 11:07:26 +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
itojun ac36f7cb2c bring in latest ALTQ from kjc. ALTQify some of the drivers. 2002-03-05 04:12:57 +00:00
martin b94047688f Avoid noise from the kernel if we have pseudo-device pppoe configured
but not used and a userland PPPoE pkg sends/receives PPPoE packets.
2002-03-04 15:15:05 +00:00
martin 493d3dde20 Add support to query the peer for DNS addreses when negotiating IPCP.
Add ioctls to retrieve the results.

While here remove a malloc()/free() of an unused buffer.
2002-03-02 16:23:42 +00:00
thorpej 759f452292 Don't call m_aux_find() to find a VLAN tag unless VLANs are configured
on the interface.
2002-02-28 19:23:03 +00:00
wiz eb16f6854f Typo fix. 2002-02-26 14:54:50 +00:00
martin a7d662b71c Clear M_BCAST and M_MCAST on outgoing mbufs.
Don't copy ttl from the inner packet to the encapsulating packet. Make
the outer ttl sysctl'able. This should close PR 14269 from Jasper Wallace
(change partly from there) and it makes traceroute work over gre tunnels.
2002-02-24 17:22:20 +00:00
martin fe97d3f7c3 Clear M_BCAST and M_MCAST flags on mbufs before passing them down to the
ethernet driver - just in case it would look at them and do the wrong
thing.
2002-02-24 17:11:53 +00:00
christos ba74a6ad5a PR/15703: Sean Boudreau: Case in route_output() where struct rtentry *rt
dereferenced after free.
2002-02-22 17:26:31 +00:00
martin 39764a5363 Use IF_IS_EMPTY and IFQ_IS_EMPTY instead of accessing queue members
directly. Noticed by Thomas Klausner.
2002-02-10 15:17:21 +00:00
martin e8aa4b2c2a Fix typo in comment. 2002-02-10 15:13:43 +00:00
thorpej 654b815d7b Add the Ethertype for 802.3x flow control packets. 2002-02-10 01:28:32 +00:00
atatat 9dd8465963 (1) Make if_index "wrap" at USHRT_MAX instead of going above it so
that other parts of the kernel won't lose gratuitously.  There are
places where it's assumed that it won't grow that large.

(2) Avoid accidental reuse of occupied slots in the ifindex2ifnet[]
table.
2002-02-09 05:56:34 +00:00
martin 727264d2c9 Avoid any non-error output for normal operations, only print those
messages if the interface is set to debug.
2002-02-01 13:50:00 +00:00
martin 6446e841ec Tweak the slow-but-persistent connection reestablishment timeout, retrying
is not realy expensive - do it once every minute.

Prevent the MTU from being set bigger than what we can handle.
2002-02-01 13:40:16 +00:00
martin 6121a90ba1 Fix copy&pasto: truncate strings copied in at *their* right length, not
some other strings length.

Found by Arne Helme.
2002-01-21 11:37:29 +00:00
jdolecek ec531589ce couple cosmetic style fixes, and drop ^L's 2002-01-18 22:39:12 +00:00
martin 301dca6ef4 Make fields in ioctl parameters that are not allowed to be negative u_ints.
Better range & sanity checking for ioctl arguments (thanks, Jaromir!)
2002-01-15 12:28:08 +00:00