summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/bootp_subr.c
Commit message (Collapse)AuthorAgeFilesLines
* University of Michigan's Citi NFSv4 kernel client code.alfred2003-11-141-0/+2
| | | | Submitted by: Jim Rees <rees@umich.edu>
* Assert GIANT_REQUIRED where sockets are manipulated. This issam2003-11-071-0/+4
| | | | | | | preparatory for MPSAFE network commits and ongoing socket locking work. Supported by: FreeBSD Foundation
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-311-7/+5
| | | | | | | | | | | | | if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname)
* - Consistently set sopt_dir.jeff2003-10-041-0/+1
| | | | Pointed out by: pete@isilon.com
* Remove now unused BOOTP tags related to NFS swap device.phk2003-09-051-3/+0
|
* Remove the magic way of configuring NFS backed swap.phk2003-08-151-163/+0
| | | | | | | | | | | | | This code dates back to the very first diskless support on FreeBSD, back when swapon(8) couldn't simply be run on a NFS backed file. Suggested replacement command sequence on the client: dd if=/dev/zero of=/swapfile bs=1k count=1 oseek=100000 swapon /swapfile rm -f /swapfile For whatever value of 100000 you want.
* 0) preallocate per-interface context structures without the ifnet lock heldbillf2003-08-071-25/+38
| | | | | | | | 1) avoid immediately calling bzero() after malloc() by passing M_ZERO 2) do not initialize individual members of the global context to zero 3) remove an unused assignment of ifctx in bootpc_init() Reviewed by: tegge
* On a socket creation error, don't close the socket.hsu2003-06-091-1/+2
|
* Remove unsed variables.phk2003-05-311-7/+2
| | | | | | Add explicit breaks to switch Found by: FlexeLint
* Back out M_* changes, per decision of the TRB.imp2003-02-191-3/+3
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-3/+3
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/schweikh2002-12-301-1/+1
| | | | Add FreeBSD Id tag where missing.
* SMP locking for radix nodes.hsu2002-12-241-0/+2
|
* SMP locking for ifnet list.hsu2002-12-221-0/+4
|
* Increase size of ifnet.if_flags from 16 bits (short) to 32 bits (int). To avoidsobomax2002-08-181-1/+1
| | | | | | | breaking application ABI use unused ifreq.ifru_flags[1] for upper 16 bits in SIOCSIFFLAGS and SIOCGIFFLAGS ioctl's. Reviewed by: -hackers, -net
* Back out my lats commit of locking down a socket, it conflicts with hsu's work.tanimura2002-05-311-6/+1
| | | | Requested by: hsu
* Fix warning; deprecated use of label at end of compound statementpeter2002-05-241-0/+1
|
* Lock down a socket, milestone 1.tanimura2002-05-201-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Add a mutex (sb_mtx) to struct sockbuf. This protects the data in a socket buffer. The mutex in the receive buffer also protects the data in struct socket. o Determine the lock strategy for each members in struct socket. o Lock down the following members: - so_count - so_options - so_linger - so_state o Remove *_locked() socket APIs. Make the following socket APIs touching the members above now require a locked socket: - sodisconnect() - soisconnected() - soisconnecting() - soisdisconnected() - soisdisconnecting() - sofree() - soref() - sorele() - sorwakeup() - sotryfree() - sowakeup() - sowwakeup() Reviewed by: alfred
* Add TAG_VENDOR_INDENTIFIER (option 60) to our DHCP request done by theambrisko2002-05-171-0/+12
| | | | | | | | | | kernel BOOTP option. The format will be: FreeBSD:<MACHINE>:<osrelease> this way people can tune their DHCP server to server up root file systems via the OS, machine type and version. Obtained from: NetBSD MFC after: 3 weeks
* We don't need the arp kludge any more.phk2002-04-281-6/+0
|
* Add a readonly sysctl variable of type string, kern.bootp_cookie,luigi2002-03-131-0/+15
| | | | | | | | | | | | | | | | | | | which is initialized with whatever string a dhcp/bootp server passes as vendor tag 134. There is no standard tag that I know with this information, and no vendor-defined tag that applies to FreeBSD that I could find doing the same thing. The intended use is to pass information to userland for run-time configuration of a diskless client without having to run a bootp/dhcp client for the third time (after the one in pxeboot/etherboot, and the one in the kernel bootp), also because these clients generally screwup the interface configuration, which is not exactly what you want when you have your disks nfs-mounted. Manpage update to follow soon. MFC-after: 3 days
* Fix warnings.. bootpc_init() and related.peter2002-02-281-2/+0
|
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredjhb2002-02-271-4/+2
| | | | reference.
* o Add missing #include's of sys/proc.h, missed in merge, required torwatson2001-12-311-0/+1
| | | | dereference td->td_proc->p_ucred.
* o Make the credential used by socreate() an explicit argument torwatson2001-12-311-2/+4
| | | | | | | | | | | | | | socreate(), rather than getting it implicitly from the thread argument. o Make NFS cache the credential provided at mount-time, and use the cached credential (nfsmount->nm_cred) when making calls to socreate() on initially connecting, or reconnecting the socket. This fixes bugs involving NFS over TCP and ipfw uid/gid rules, as well as bugs involving NFS and mandatory access control implementations. Reviewed by: freebsd-arch
* Increase the buffer size to hold a bootp/DHCP reply from 256 bytes toambrisko2001-12-301-1/+1
| | | | | | | | | | | 1222 bytes (derived as the maximum that isc-dhcpd uses). This solves the problem if a bootp/DHCP reply is over 256 bytes in which the end of the bootp/DHCP reply will not be found and then the reply will be ignored. This happens when swap and root paths are longish or many parameters are set. Reviewed by: imp Approved by: imp
* Cleanup and split of nfs client and server code.peter2001-09-181-259/+212
| | | | This builds on the top of several repo-copies.
* KSE Milestone 2julian2001-09-121-49/+49
| | | | | | | | | | | | | | 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
* Enable use of DHCP extensions.tegge2001-02-021-33/+240
| | | | Reviewed by: Per Kristian Hove <Per.Hove@math.ntnu.no>
* * Rename M_WAIT mbuf subsystem flag to M_TRYWAIT.bmilekic2000-12-211-1/+1
| | | | | | | | | | | | | | | | | | This is because calls with M_WAIT (now M_TRYWAIT) may not wait forever when nothing is available for allocation, and may end up returning NULL. Hopefully we now communicate more of the right thing to developers and make it very clear that it's necessary to check whether calls with M_(TRY)WAIT also resulted in a failed allocation. M_TRYWAIT basically means "try harder, block if necessary, but don't necessarily wait forever." The time spent blocking is tunable with the kern.ipc.mbuf_wait sysctl. M_WAIT is now deprecated but still defined for the next little while. * Fix a typo in a comment in mbuf.h * Fix some code that was actually passing the mbuf subsystem's M_WAIT to malloc(). Made it pass M_WAITOK instead. If we were ever to redefine the value of the M_WAIT flag, this could have became a big problem.
* Remove unneeded #include <sys/proc.h> lines.phk2000-10-291-1/+0
|
* Reduce kernel stack usage by not having large packets on the stack.tegge2000-10-291-516/+1024
| | | | | | Supply correct size parameter to dhcpd. Replace some magic numbers with macro names. Handle more than one interface.
* Eliminate some bitrot (nonexisting member variable names).tegge2000-10-241-5/+5
| | | | Don't use curproc when a proc pointer is available.
* Style fixes.tegge2000-10-241-783/+842
|
* Correctly set the Maximum DHCP Message Size. bootpd now worksps2000-06-131-1/+1
| | | | again as well as ISC dhcpd.
* Include a RFC 1533 "Maximum DHCP Message Size" option in our request.phk2000-05-071-5/+17
| | | | | | ISC DHCP will limit the reply length to 64 bytes for bootp replies unless we explicitly tell it we can do more. We tell it that we can do 1200 bytes.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-271-3/+3
| | | | | | | kernel compile. This commit includes significant work to proper handle const arguments for the DDB symbol routines.
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-071-5/+2
| | | | and local variables, goto labels, and functions declared but not defined.
* Examine all occurrences of sprintf(), strcat(), and str[n]cpy()archie1998-12-041-3/+4
| | | | | | | | | | | | | | for possible buffer overflow problems. Replaced most sprintf()'s with snprintf(); for others cases, added terminating NUL bytes where appropriate, replaced constants like "16" with sizeof(), etc. These changes include several bug fixes, but most changes are for maintainability's sake. Any instance where it wasn't "immediately obvious" that a buffer overflow could not occur was made safer. Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Reviewed by: Mike Spengler <mks@networkcs.com>
* Make bootp error message slightly more verbosedillon1998-12-031-2/+2
|
* Yow! Completely change the way socket options are handled, eliminatingwollman1998-08-231-27/+19
| | | | | | another specialized mbuf type in the process. Also clean up some of the cruft surrounding IPFW, multicast routing, RSVP, and other ill-explored corners.
* Fixed printf format errors.bde1998-08-181-3/+3
|
* Eradicate the variable "time" from the kernel, using various measures.phk1998-03-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "time" wasn't a atomic variable, so splfoo() protection were needed around any access to it, unless you just wanted the seconds part. Most uses of time.tv_sec now uses the new variable time_second instead. gettime() changed to getmicrotime(0. Remove a couple of unneeded splfoo() protections, the new getmicrotime() is atomic, (until Bruce sets a breakpoint in it). A couple of places needed random data, so use read_random() instead of mucking about with time which isn't random. Add a new nfs_curusec() function. Mark a couple of bogosities involving the now disappeard time variable. Update ffs_update() to avoid the weird "== &time" checks, by fixing the one remaining call that passwd &time as args. Change profiling in ncr.c to use ticks instead of time. Resolution is the same. Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call hzto() which subtracts time" sequences. Reviewed by: bde
* Moved some #includes from <sys/param.h> nearer to where they are actuallybde1998-03-281-1/+2
| | | | used.
* Add a BOOTP_WIRED_TO option, for use on machines with multiple networktegge1998-03-141-3/+14
| | | | | cards where the first detected card should not be used for bootp. Submitted by: Doug Ambrisko <ambrisko@whistle.com>
* Update workaround for limitations in the arp code.tegge1998-03-141-4/+4
| | | | | Adjust the RPC timeout message which occured when the old workaround broke to show the correct IP address.
* Staticize.eivind1998-02-091-9/+10
|
* Increase the minimum bootp reply packet size from 16 (bogus) to 300 (correct).tegge1998-01-181-4/+4
|
* Make the BOOTP family new-style options (in opt_bootp.h)eivind1998-01-091-1/+3
|
OpenPOWER on IntegriCloud