summaryrefslogtreecommitdiffstats
path: root/sys/net
Commit message (Collapse)AuthorAgeFilesLines
* Replace (deprecated ?) FREE() macro with direct calls to free()luigi2002-04-048-22/+22
|
* Fix incorrect m_free - m_freem() usage.luigi2002-04-041-3/+2
|
* Fix a couple of incorrect m_free() vs. m_freem() usages and related issues.luigi2002-04-043-31/+20
| | | | Reviewed-by: brooks
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-019-26/+30
| | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@
* Make `route add -inet6 default ::1 -ifp gif0' work actually.ume2002-04-011-5/+1
| | | | | | The change between 1.13 and 1.14 is specific to AF_INET. MFC after: 1 week
* - Merge the pdq driver (if_fpa and if_fea) from NetBSD.mdodd2002-03-292-6/+11
| | | | | Among other things this gets us ifmedia support. - Update fddi_ifattach() to take an additional argument.
* - Define fddibroadcastaddr in if_fddisubr.c.mdodd2002-03-292-5/+108
| | | | - Add fddi_ifdetach() and fddi_ioctl().
* - Use ifp->if_broadcastaddr when possible.mdodd2002-03-291-4/+2
| | | | - Remove unnecessary preprocessor conditional.
* - Add a comment.mdodd2002-03-291-2/+4
| | | | | - Whitespace. - Remove forgotten duplicate assignments in fddi_ifattach().
* - Update interface statistics on error conditions.mdodd2002-03-291-13/+50
| | | | | | | - Make sure the interface is UP and RUNNING in fddi_input(). - Reorder and comment packet tests in fddi_input(). - Call if_attach() in fddi_ifattach(). - Test for a valid return from ifaddr_byindex().
* - Whitespace changes.mdodd2002-03-291-8/+17
| | | | | | - Formatting. - Use macro, not magic numbers. - Move a dropanyway label in fddi_input() to end of function.
* Back a small part of the last patch.mdodd2002-03-291-3/+3
|
* - Simplify first arg of nd6_storelladdr().mdodd2002-03-291-15/+29
| | | | | | | - Use struct fddi_header where appropriate. - Use bcopy() rather than memcpy(). - Use FDDI_ADDR_LEN macro instead of ETHER_ADDR_LEN macro. - Add loadable module support.
* - Use net/fddi.h rather than netinet/if_fddi.h.mdodd2002-03-291-21/+21
| | | | | | - Use FDDI_ADDR_LEN rather than a magic number or a sizeof(). - Hide distracting sizeof() behind FDDI_HDR_LEN macro. - Don't use sizeof(struct llc) in areas where we mean LLC_SNAPFRAMELEN.
* Sync defines with NetBSD.mdodd2002-03-291-13/+30
| | | | Define FDDI_ADDR_LEN and use it.
* Remove unnecessary LLC defines and use the standard ones.mdodd2002-03-291-16/+6
|
* - style(9) fixes for 'return'.mdodd2002-03-291-22/+21
| | | | | - retire RTALLOC1 and ARPRESOLVE macros. - use IFP2AC to hide discracting casts.
* Un-ifdef.mdodd2002-03-291-37/+0
|
* De-register.mdodd2002-03-291-10/+10
|
* Sync with NetBSD.mdodd2002-03-291-45/+60
|
* 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
OpenPOWER on IntegriCloud