summaryrefslogtreecommitdiffstats
path: root/sys/net
Commit message (Collapse)AuthorAgeFilesLines
* Add ability to attach knotes to network devices.jlemon2001-09-291-1/+73
| | | | Introduce EVFILT_NETDEV to report network device changes.
* Introduce network device nodes. Network devices will now automaticallyjlemon2001-09-291-63/+157
| | | | | | appear in /dev. Interface hardware ioctls (not protocol or routing) can be performed on the descriptor. The SIOCGIFCONF ioctl may be performed on the special /dev/network node.
* Change sysctl_iflist() so it has a single point of return. This willjlemon2001-09-291-3/+4
| | | | assist any future locking efforts.
* Use in_ifaddrhashtbl instead of in_ifaddrhead to look up IP address.jlemon2001-09-291-5/+1
|
* Two main changes here:luigi2001-09-271-2/+2
| | | | | | | | | | | | | | | + implement "limit" rules, which permit to limit the number of sessions between certain host pairs (according to masks). These are a special type of stateful rules, which might be of interest in some cases. See the ipfw manpage for details. + merge the list pointers and ipfw rule descriptors in the kernel, so the code is smaller, faster and more readable. This patch basically consists in replacing "foo->rule->bar" with "rule->bar" all over the place. I have been willing to do this for ages! MFC after: 1 week
* /home/brooks/ng_gif.messagebrooks2001-09-262-1/+28
|
* Use LIST_ macros instead of TAILQ_ macros to be more like NetBSD.brooks2001-09-262-9/+12
| | | | Obtained from: NetBSD
* Make faith loadable, unloadable, and clonable.brooks2001-09-252-88/+142
|
* Use the passed in thread to selrecord() instead of curthread.jhb2001-09-213-3/+3
|
* Use the current process's credentials rather than socket's cached.ru2001-09-201-2/+2
| | | | | | | If the process drops its super-user privileges, we certainly don't want to allow it to modify routing tables. Discussed with: rwatson
* Make stf a clonable device.brooks2001-09-191-41/+109
| | | | | | Yes this really is rather silly and the implementation is overkill given that you are only allowed one of them, but NetBSD implements cloning on this device and it's a less cluttered example of cloning then most.
* Split HWCSUM into two components: RX and TX, for the benefit of driversjlemon2001-09-181-2/+5
| | | | which can only do checksum offloading in one direction.
* Add two fields to the ifnet structure indicating what extra capabilitiesjlemon2001-09-183-0/+23
| | | | a network device has, and which ones are enabled.
* KSE Milestone 2julian2001-09-1215-80/+89
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Fix some signed/unsigned integer confusion, and add bounds checking ofkris2001-09-101-1/+2
| | | | | | | | arguments to some functions. Obtained from: NetBSD Reviewed by: peter MFC after: 2 weeks
* Remove/comment tokens after #endif (#endif NETATALK)peter2001-09-102-4/+4
|
* Patches from KAME to remove usage of Varargs in existingjulian2001-09-072-11/+4
| | | | | | | IPV4 code. For now they will still have some in the developing stuff (IPv6) Submitted by: Keiichi SHIMA / <keiichi@iij.ad.jp> Obtained from: KAME
* Fix another shortcircuit return() statement that I missed.jlemon2001-09-071-1/+1
|
* Fix sense of comparison in space test. Also eliminate a compilejlemon2001-09-071-8/+8
| | | | warning and remove a previously existing off-by-one error.
* Wrap array accesses in macros, which also happen to be lvalues:jlemon2001-09-068-52/+72
| | | | | | | ifnet_addrs[i - 1] -> ifaddr_byindex(i) ifindex2ifnet[i] -> ifnet_byindex(i) This is intended to ease the conversion to SMPng.
* Cosmetic cleanups and rearrangement for code to come. There should bejlemon2001-09-061-63/+68
| | | | no functional change in this commit.
* Make vlan(4) loadable, unloadable, and clonable. As a side effect,brooks2001-09-054-72/+173
| | | | | | | interfaces must now always enable VLAN support. Reviewed by: jlemon MFC after: 3 weeks
* Add cloning support for the tap(4) device similar to that in the tun(4)brooks2001-09-052-136/+221
| | | | | | device. Submitted by: Maksim Yevmenkin <myevmenk@digisle.net>
* Patches from Keiichi SHIMA <keiichi@iij.ad.jp>julian2001-09-032-5/+3
| | | | | | to make ip use the standard protosw structure again. Obtained from: Well, KAME I guess.
* Synch with NetBSD and OpenBSD.ru2001-08-311-1/+9
| | | | | | | | | | Allow non-superuser to open, listen to, and send safe commands on the routing socket. Superuser priviledge is required for all commands but RTM_GET. Lose `setuid root' bit of route(8). Reviewed by: wollman, dd
* TUNSIFINFO now expects IFF_MULTICAST to be OR'd with either IFF_POINTOPOINTbrian2001-08-251-6/+4
| | | | | | or IFF_BROADCAST. If it's not, the IFF_MULTICAST is removed. This is in line with how NetBSD & OpenBSD do it.
* Correct the comment about bpfattach() to match reality.dd2001-08-231-3/+4
| | | | | PR: 29967 Submitted by: Joseph Mallett <jmallett@xMach.org>
* Fix typojulian2001-08-161-1/+1
| | | | | Submitted by: BDE MFC after: 2 weeks
* Only allocate teh 1540 byte buffer if we need it..julian2001-08-161-20/+20
| | | | | | (lazy allocation) MFC after: 13 days
* Don't allocate an entire 1500 byte buffer on the stack.julian2001-08-152-5/+14
| | | | | | May need more review in light of SMP. MFC after: 2 weeks
* printed current sequence number of the SA. accordingly, changedume2001-08-061-2/+2
| | | | | | | | into sadb_x_sa2_sequence from sadb_x_sa2_reserved3 in the sadb_x_sa2 structure. Also the output of setkey is changed. sequence number of the sadb is replaced to the end of the output. Obtained from: KAME
* Don't terminate the uiomove() loop on a zero-length mbuf. It's notfenner2001-08-031-4/+3
| | | | | | | particularly nice that IPSEC inserts a zero-length mbuf into the chain, and that bug should be fixed too, but interfaces should be robust to bad input. Print the interface name when TUNDEBUG()ing about dropping an mbuf.
* fix memory leak when error during opening of routing socketjon2001-08-021-0/+1
| | | | | | PR: kern/29336 Submitted by: Richard Andrades <richard@xebeo.com> MFC after: 1 month
* Update our bpf.h with tcpdump.org's new DLT_ types.fenner2001-07-311-2/+82
| | | | Use our bpf.h instead of tcpdump.org's to build libpcap.
* If LCP proto-rej is received, drop the protocol mentioned by the message.ume2001-07-311-1/+59
| | | | | | | | This is to be friendly with non-IPv6 peer (If the peer complains due to lack of IPv6CP, drop IPv6CP). This basically implements "RXJ+" state transition in the RFC. Obtained from: NetBSD
* incorrect bounds-check on snprintf.itojun2001-07-261-2/+2
| | | | Submitted by: fenner
* Don't bother passing p to rtioctl just so it can fail to pass it to mrt_ioctlfenner2001-07-252-7/+2
|
* As commented in defined in sys/net/route.c, rt_fixchange() has a badume2001-07-251-5/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | effect, which would cause unnecessary route deletion: * Unfortunately, this has the obnoxious * property of also triggering for insertion /above/ a pre-existing network * route and clones. Sigh. This may be fixed some day. The effect has been even worse, because recent versions of route.c set the parent rtentry for cloned routes from an interface-direct route. For example, suppose that we have an interface "ne0" that has an IPv4 subnet "10.0.0.0/24". Then we may have a cloned route like 10.0.0.1 on the interface, whose parent route is 10.0.0.0/24 (to the interface ne0). Now, when we add the default route (i.e. 0.0.0.0/0), rt_fixchange() will remove the cloned route 10.0.0.1. The (bad) effect also prevents rt_setgate from configuring rt_gwroute, which would not be an intended behavior. As suggested in the comments to rt_fixchange(), we need stricter check in the function, to prevent unintentional route deletion. This fix also solve the "IPV6 panic?" problem in nd6_timer(). Submitted by: JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp> MFC after: 4 days
* Eliminate the panic, reported by Daniel Sobral, which occurs whenfenner2001-07-241-17/+36
| | | | | | | vlan_unconfig()-ing an interface on which multicast groups have been joined. Instead, keep the list of groups around (and, in fact, allow changing of the membership list) and re-join them when the vlan interface is reassociated with a lower level interface.
* Use the IANA assignment IFT_L2VLAN directly instead of indirecting throughfenner2001-07-242-5/+2
| | | | | | a privately #defined IFT_8021_VLAN. MFC after: 3 days
* unbreak building kernel without option INET6ume2001-07-052-0/+4
| | | | Reported by: markp
* adjust mbuf length right in route_output().ume2001-07-041-1/+7
| | | | | Obtained from: KAME MFC after: 1 week
* gif(4) and stf(4) modernization:brooks2001-07-023-117/+240
| | | | | | | | | | | - Remove gif dependencies from stf. - Make gif and stf into modules - Make gif cloneable. PR: kern/27983 Reviewed by: ru, ume Obtained from: NetBSD MFC after: 1 week
* Add kernel infrastructure for network device cloning.brooks2001-07-023-5/+238
| | | | | | Reviewed by: ru, ume Obtained from: NetBSD MFC after: 1 week
* inject outbound packet to BPF.ume2001-06-241-1/+25
| | | | | | Submitted by: itojun Obtained from: KAME MFC after: 10 days
* Close a race where we were releasing the unit resource at the startbrian2001-06-201-2/+4
| | | | | | | | | | | | of tunclose() rather than the end, and tunopen() grabbed that unit before tunclose() finished (one process is allocating it while another is freeing it!). It may be worth hanging some sort of rw mutex around all specinfo calls where d_close and the detach handler get a write lock and all other functions get a read lock. This would guarantee certain levels of ``atomicity'' (is that a word?) that people may expect (I believe Solaris does something like this).
* Suppress update ifnet.iflastchange when processing packets for SNMPsumikawa2001-06-191-1/+0
| | | | | | | | | | | | | requirements(RFC1573, interface MIB). This change for 4.4BSD was first introduced in if_ethersubr.c:1.17->1.18. BTW, iflastchange on all of IFs are inconsistent. e.g. ether, tun: update fddi, tokenring, ppp: not update I'll make patch later. Obtained from: KAME MFC after: 2 weeks
* Remove the SI_CHEAPCLONE flag when hanging resources off the dev_tbrian2001-06-181-0/+2
|
* This file was a horrible mixture of styles old and new.markm2001-06-161-27/+16
| | | | Apply style(9).
* Do not perform arp send/resolve on an interface marked NOARP.jlemon2001-06-153-5/+9
| | | | | PR: 25006 MFC after: 2 weeks
OpenPOWER on IntegriCloud