summaryrefslogtreecommitdiffstats
path: root/sys/net
Commit message (Collapse)AuthorAgeFilesLines
* Fixed some style bugs in the removal of __P(()). The main ones werebde2002-03-2411-42/+38
| | | | | | not removing tabs before "__P((", and not outdenting continuation lines to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting and/or rewrap the whole prototype in some cases.
* Work around zlib bug where using a deflate window size of 8 willjedgar2002-03-231-1/+1
| | | | cause memory corruption.
* Fix a bug introduced in 1.11 (and also MFCd to stable AND the security branch)dillon2002-03-201-1/+5
| | | | | | | | | | | | | | | | | | | | that causes a machine to panic when the kernel PPP / DEFLATE code is used. 1.11 moved a ZFREE to a point after the structural members were clobbered by stores into a union'd structure. This commit fixes the bug and adds a big whopping comment to make sure the code isn't 'cleaned up' again :-) Ian Dowse came up with the same patch independantly 68 seconds before I did, talk about Karma! I would also like to thank Eugene Grosbein for marathon work in tracking the problem down by udpating his -stable based on date over and over again to close in on the commit that caused his crashes. PR: kern/35969 Reviewed by: Ian Dowse <iedowse@maths.tcd.ie> X-MFC after: immediately
* Remove __P.alfred2002-03-1941-394/+383
|
* Add hooks for very basic IPFilter support in bridging. Set,cjc2002-03-181-5/+42
| | | | | | | | | | | | | # sysctl net.link.ether.bdg_ipf=1 To enable. Just like ipfw(8) bridging, only input packets are filtered in the bridge. Filtering works just like in the IP layer, ipf(8) first, then ipfw(8). And just like in the IP layer, both are independent, one need not be run to use the other. (Note: This will not work in, but doesn't break, the bridge.ko module. The ipl.ko module would need to be fixed before that is worth worrying about.) Reviewed by: luigi
* Missed this file for select SMP fixes associated with rev 1.93 ofalfred2002-03-141-2/+0
| | | | kern/sys_generic.c
* Simplify the interface cloning framework by handling unitmux2002-03-119-252/+95
| | | | | | | | | unit allocation with a bitmap in the generic layer. This allows us to get rid of the duplicated rman code in every clonable interface. Reviewed by: brooks Approved by: phk
* Use revoke_and_destroy_dev() instead of destroy_dev() when removing /dev/netgreen2002-03-051-1/+1
| | | | | | | pseudo-devices when an interface goes away. Otherwise, an open /dev/net/foo0 when the interface is removed can cause a crash. Not objected to by: jlemon
* Remove duplicated and wrong sc->sc_last_recv setting. It unbreaksmaxim2002-03-051-4/+1
| | | | | | | | | | | active-filter in pppd(8). PR: kern/12281 Submitted by: Tim Moore <moore@bricoworks.com> Not objected by: peter Reviewed by: ru Approved by: ru MFC after: 1 week
* Unbreak bridge.ko. Replace an unresolved symbol with the actions itcjc2002-03-051-1/+3
| | | | | | | | was meant to take. Submitted by: luigi Approved by: luigi MFC after: 3 days
* Add cloning support to the loopback interface.brooks2002-03-041-56/+99
| | | | Submitted by: mux
* Change the network interface cloning API so the destroy function returnsbrooks2002-03-046-11/+14
| | | | | | | | an int errorcode instead of void in preperation for merging cloning of the loopback device. Submitted by: mux MFC after: 2 weeks
* Fix warnings.peter2002-02-281-2/+2
|
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredjhb2002-02-272-4/+4
| | | | reference.
* Fix warnings in the gif(4) driver so it compiles with -Werror.brooks2002-02-261-4/+6
|
* Did someone turn on -Werror or something?dillon2002-02-261-0/+2
| | | | Fix kernel breakage.
* minor style(9) fix: return (foo); The file was mostly style(9) before.imp2002-02-261-16/+16
|
* When using hardware decoding, reconstruct the wire form of the ethernetbrooks2002-02-261-0/+20
| | | | | | | | header and push it up any attached bpf devices on the parent interface. This makes hardware vlan decoding more like the normal software path. Tested by: cjtt@employees.org MFC after: 2 weeks
* Make gif(4) nesting level and parallel tunnel support tunable at runtimebrooks2002-02-261-5/+27
| | | | | | 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.
* Fix a warning by pulling prototype for arp_ifinit() into scope.peter2002-02-261-1/+4
| | | | | Then fix cast the correct value into an incorrect value, which was not detected due to the missing prototype (but was harmless anyway).
* Lock struct pgrp, session and sigio.tanimura2002-02-231-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | New locks are: - pgrpsess_lock which locks the whole pgrps and sessions, - pg_mtx which protects the pgrp members, and - s_mtx which protects the session members. Please refer to sys/proc.h for the coverage of these locks. Changes on the pgrp/session interface: - pgfind() needs the pgrpsess_lock held. - The caller of enterpgrp() is responsible to allocate a new pgrp and session. - Call enterthispgrp() in order to enter an existing pgrp. - pgsignal() requires a pgrp lock held. Reviewed by: jhb, alfred Tested on: cvsup.jp.FreeBSD.org (which is a quad-CPU machine running -current)
* When the local link address is changed, send out gratuitous ARPsluigi2002-02-181-0/+11
| | | | | | | | | | | to notify other nodes about the address change. Otherwise, they might try and keep using the old address until their arp table entry times out and the address is refreshed. Maybe this ought to be done for INET6 addresses as well but i have no idea how to do it. It should be pretty straightforward though. MFC-after: 10 days
* o Move NTOHL() and associated macros into <sys/param.h>. These aremike2002-02-181-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | deprecated in favor of the POSIX-defined lowercase variants. o Change all occurrences of NTOHL() and associated marcros in the source tree to use the lowercase function variants. o Add missing license bits to sparc64's <machine/endian.h>. Approved by: jake o Clean up <machine/endian.h> files. o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>. o Remove prototypes for non-existent bswapXX() functions. o Include <machine/endian.h> in <arpa/inet.h> to define the POSIX-required ntohl() family of functions. o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>, and <sys/param.h>. o Prepend underscores to the ntohl() family to help deal with complexities associated with having MD (asm and inline) versions, and having to prevent exposure of these functions in other headers that happen to make use of endian-specific defines. o Create weak aliases to the canonical function name to help deal with third-party software forgetting to include an appropriate header. o Remove some now unneeded pollution from <sys/types.h>. o Add missing <arpa/inet.h> includes in userland. Tested on: alpha, i386 Reviewed by: bde, jake, tmm
* Error handling fixes for inflate.jedgar2002-02-171-4/+7
|
* Lots of improvement to the bridging code.luigi2002-02-152-302/+403
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order of importance: + each cluster now uses private data structures (filtering and local address tables) so you can treat them as fully independent switches. This part of the work was supported by: Cisco Systems, Inc. - NSITE lab, RTP, NC. + cleaned up the handling of configuration, so the system will behave much better when real or pseudo devices are dynamically attached or detached. It should also not panic anymore on systems with large number of devices, closing a few existings PRs on the topic. + while at it, add support for VLAN. This means that a FreeBSD box can now work as a real VLAN switch, with trunk interfaces etc. As an example: ifconfig vlan0 vlan 3 vlandev dc0 ifconfig vlan1 vlan 4 vlandev dc0 net.link.ether.bridge_cfg="vlan0:3,dc1:3,vlan1:4,dc1:4" uses dc0 as a trunk interface, and dc1 and dc3 as ports on vlans 3 and 4 You get the idea... NOTA BENE: by default bridge_cfg is initialised to "" so even if you enable bridging, no packets will be bridged until you set the list of interfaces on which you want this to happen. + large restructuring of the code, moving private vars and types from bridge.h to bridge.c. + added a lot of comments to the code to explain how to use it.
* Remove useless initialization to 0 of a couple of global variables.luigi2002-02-151-2/+2
|
* remove superflous empty line (in preparation to MFC)fjoe2002-02-131-1/+0
|
* Get rid of the twisted MFREE() macro entirely.dillon2002-02-055-31/+26
| | | | | Reviewed by: dg, bmilekic MFC after: 3 days
* Prevent the kernel from generating an unaligned sysctl data buffer ongallatin2002-01-271-0/+1
| | | | | | | | | 64-bit platforms. The unaligned access is caused by struct ifa_msghdr not being a multiple of 8-bytes in size. If an interface has an odd number of addresses, this causes the next interface to generate an unaligned access in the user-level app walking the interfaces (ifconfig). Submitted by: Bernd Walter <ticso@cicely8.cicely.de>
* Have sysctl() return the correct errno(2) as documented in thecjc2002-01-251-1/+1
| | | | | | | sysctl(3) manpage. Submitted by: ru Obtained from: BSD/OS
* Introduce an interface announcement message for the routingru2002-01-184-0/+55
| | | | | | | | | socket so that routing daemons and other interested parties know when an interface is attached/detached. PR: kern/33747 Obtained from: NetBSD MFC after: 2 weeks
* It turns out that when a broadcast packet is looped back, the checksumsjesper2002-01-111-0/+13
| | | | | | | | | | | | are checked on the way in even if they were not calculated on the way out. This fixes rwhod PR: 31954 Submitted by: fenner Approved by: fenner MFC after: 1 week
* - generic Arcnet frameworkfjoe2002-01-081-0/+780
| | | | | | - device driver for SMC COM90cx6 Arcnet network adapters Obtained from: NetBSD
* Initialise the intrq_present fields at runtime, not link time. This allowsmsmith2002-01-082-10/+19
| | | | | | us to load protocols at runtime, and avoids the use of common variables. Also fix the ip6_intrq assignment so that it works at all.
* Staticise private interface lists.msmith2002-01-086-7/+5
|
* Implement an option to administratively disable the negotiation ofjoerg2001-12-302-8/+60
| | | | | | | | | | | | | | | | | IPv6 on an sppp interface. In an IPv6-enabled kernel, every IPv6 interface automatically gets an IPv6 address assigned (and IPv6 multicast packets sent at initialization time). For sppp links where we know our remote peer wouldn't support IPv6 at all, there's no point in attempting to negotiate IPV6CP (or to even dial out for an IPv6 packet at all for dial-on-demand interfaces). I wish there were a more generic way to administratively disable IPv6 on an interface instead. ume told me there isn't. While i was at it, converted both, enable_vj and enable_ipv6 into flag bits in struct sppp (enable_vj used to be an int of its own). MFC after: 1 month
* Merge last-minute fix from the i4b file made by gj:joerg2001-12-301-2/+4
| | | | | | | Protect mtx_init() invocations with mtx_intialized() checks to avoid a reported panic. MFC after: 1 month
* Bump AUTHNAMELEN to 64. Should probably be made dynamic instead.joerg2001-12-301-1/+1
|
* We explicitly close LCP when going to state CLOSED, so we better openjoerg2001-12-301-0/+4
| | | | | | | | it again when going from INITIAL to STARTING. This has been done for passive or auto-conecting interfaces always, but not for permanent ones. Obtained from: NetBSD (rev 1.32)
* run IPCP only if we have IPv4 in kerneljoerg2001-12-301-1/+7
| | | | | Obtained from: NetBSD (rev 1.19) MFC after: 1 month
* Fix a long-standing blatant bug where the operator precedence betweenjoerg2001-12-301-4/+4
| | | | | | | | & and && has been botched. This was likely the cause for some havoc with various negotiation cases of sppp in the past. Obtained from: NetBSD (rev 1.13) MFC after: 1 week
* Fix compilation without INET (though not really tested yet withoutjoerg2001-12-301-6/+10
| | | | | | | INET). Obtained from: NetBSD (rev 1.12) MFC after: 1 month
* Add the `packed' attribute to structures which describe wire protocoljoerg2001-12-301-4/+4
| | | | | | | data formats. Obtained from: NetBSD (rev 1.6) MFC after: 1 month
* Extend the hack where 0.0.0.1 meant `any address for remote isjoerg2001-12-301-2/+2
| | | | | | | acceptable' to addresses 0.0.0.*. This allows for multiple such interfaces. MFC after: 1 month
* Fix the handling of VJ uncompression. Unfortunately, tcp_uncompress()joerg2001-12-301-14/+39
| | | | | | | | | | | | | | | | | | | | makes the implied assumption there were another 128 bytes of space in front of the packet handed off to it... which is not the case for sppp. This could easily end up in corrupting random memory. This fix is about the same as revs 1.6, 1.8, and 1.9 from our i4b_ispppsubr.c. Also fixed IPCP option negotiation to zero out the options when starting IPCP. Otherwise, if negotiation parameters change between various IPCP startups, it could happen that old options would still be requested (this happened if VJ was turned off, and ended up in half off the link still negotiating for VJ compression). IMHO, the base system's sppp is now feature-wise up to date with the one in the i4b part of the tree, so the latter can be disabled. MFC after: 1 month
* sparc64 needs the same alingment fixes that alpha and ia64 do.jake2001-12-291-1/+1
| | | | Submitted by: tmm
* sparc64 needs the same alignment fixes that ia64 and alpha need.jake2001-12-291-1/+1
| | | | Submitted by: tmm
* Convert sppp_params() to use a malloced structure in order to reducejoerg2001-12-281-45/+65
| | | | | | | | kernel stack usage. This effectively merges rev 1.3 of i4b's i4b_ispppsubr.c. MFC after: 1 month
* Fix my breakage to the low-level hardware sync drivers brought by thejoerg2001-12-282-26/+27
| | | | | | | | | | | | inclusion of VJ compression into sppp. Now, instead of the need to include this and that and everything plus the kitchensink in each of those drivers, struct sppp uses struct slcompress as an opaque structure only referenced by a pointer. The actual structure is then malloced at initialization time. While i was at it, also fixed a bug where received VJ packets would only be recognized if INET6 was defined.
* Implement timestamps so i4b/driver/i4b_isppp.c can derive the idlejoerg2001-12-282-4/+27
| | | | | | | | | | | | time from the PPP packets sent. This effectively merges rev 1.2 of the old i4b_ispppsubr.c, with the exception that i eventually ended up in debugging and fixing it so the idle time is now really detected. ;-) (The version in i4b simply doesn't work right since it still accounts for incoming LCP echo packets which it is supposed to ignore for idle time considerations...) Obtained from: i4b MFC after: 1 month
OpenPOWER on IntegriCloud