Commit graph

130462 commits

Author SHA1 Message Date
Pawel Jakub Dawidek bb531912ff Rename PRIV_VFS_CLEARSUGID to PRIV_VFS_RETAINSUGID, which seems to better
describe the privilege.

OK'ed by:	rwatson
2007-03-01 20:47:42 +00:00
Pawel Jakub Dawidek 3b2eb461e0 Avoid checking for privileges if there is no need to.
Discussed with:	rwatson
2007-03-01 20:38:24 +00:00
Bruce M Simpson 6f7ca813c4 Do not dispatch SIGPIPE from the generic write path for a socket; with
this patch the code behaves according to the comment on the line above.

Without this patch, a socket could cause SIGPIPE to be delivered to its
process, once with SO_NOSIGPIPE set, and twice without.

With this patch, the kernel now passes the sigpipe regression test.

Tested by:	Anton Yuzhaninov
MFC after:	1 week
2007-03-01 19:20:25 +00:00
Bruce M Simpson df7babd689 Add -t to set IP TTL. 2007-03-01 18:36:16 +00:00
Hajimu UMEMOTO a404ab168e Check the return value from rad_cvt_ipv6prefix().
PR:		bin/89808
MFC after:	1 week
2007-03-01 16:13:56 +00:00
Ruslan Ermilov 857be7a47c Bump the bootstrapping requirements for gensnmptree(1) and remove
a note in UPDATING that tried to work around the build breakage.

Tested by:	jhb
OK'ed by:	njl
2007-03-01 15:42:23 +00:00
Bruce M Simpson a96ef0cd9a Introduce a new mbuf flag, M_PROMISC.
An mbuf packet chain with the M_PROMISC flag set contains a unicast packet
received by the link layer, which does not correspond to any configured
link layer address in the local system.

It is copied when copying m_pkthdr. It is not cleared when crossing layers.
As such, it is defined to have a flag value which is outside of the
M_PROTO* range, like M_VLANTAG has.

Reviewed by:	andre
Obtained from:	NetBSD
2007-03-01 14:38:08 +00:00
Ruslan Ermilov e69b11c87d Remove trailing spaces and make the date canonical. 2007-03-01 14:33:29 +00:00
Konstantin Belousov 0a592d0535 Unbreak the kgdb stepping over the special frames on i386 after rev. 1.117 of
i386/i386/exception.s.

No objections from:	marcel
2007-03-01 13:56:08 +00:00
Konstantin Belousov d7eb5fb599 Rename lookup() to kgdb_lookup() and make it global (for use in trgt_i386.c).
No objections from:	marcel
2007-03-01 13:55:15 +00:00
Bruce M Simpson a3fd02d88b Fix undirected broadcast sends for the case where SO_DONTROUTE has also
been set at the socket layer, in our somewhat convoluted IPv4 source
selection logic in ip_output().

IP_ONESBCAST is actually a special case of SO_DONTROUTE, as 255.255.255.255
must always be delivered on a local link with a TTL of 1.

If IP_ONESBCAST has been set at the socket layer, also perform destination
interface lookup for point-to-point interfaces based on the destination
address of the link; previously it was not possible to use the option with
such interfaces; also, the destination/broadcast address fields map to the
same field within struct ifnet, which doesn't help matters.

One more valid fix going forward for these issues is to treat 255.255.255.255
as a destination in its own right in the forwarding trie. Other
implementations do this. It fits with the use of multiple paths, though
it then becomes necessary to specify interface preference.
This hack will eventually go away when that comes to pass.

Reviewed by:	andre
MFC after:	1 week
2007-03-01 13:29:30 +00:00
Bruce M Simpson 2b743a9e9d Introduce a test program for IPv4 broadcast datagram send. 2007-03-01 13:26:13 +00:00
Andre Oppermann 6aa5b62315 Prevent TSO mbuf chain from overflowing a few bytes by subtracting the
TCP options size before the TSO total length calculation.

Bug found by:	kmacy
2007-03-01 13:12:09 +00:00
Bruce M Simpson 4039f5fc03 Mark addr2ascii() man page as obsolete.
Submitted by:	Maxim Konovalov
2007-03-01 10:53:55 +00:00
Kip Macy a5bceb77f2 Evidently I've overestimated gcc's ability to peak inside inline functions
and optimize away unused stack values. The 48 bytes that the lock_profile_object
adds to the stack evidently has a measurable performance impact on certain workloads.
2007-03-01 09:35:48 +00:00
Paolo Pisati b07b4f1229 Update bus_setup_intr().
Pointed by: Krassimir Slavchev
2007-03-01 09:10:55 +00:00
Christian Brueffer dbb3ac38af New sentence -> new line and contractions removed. 2007-03-01 09:07:04 +00:00
Robert Watson ede6e136f8 Remove two simultaneous acquisitions of multiple unpcb locks from
uipc_send in cases where only a global read lock is held by breaking
them out and avoiding the unpcb lock acquire in the common case.  This
avoids deadlocks which manifested with X11, and should also marginally
further improve performance.

Reported by:	sepotvin, brooks
2007-03-01 09:00:42 +00:00
Tim Kientzle 6fccc5ecd4 Because the buffer gets released immediately, I need to
copy the symlink target name, not just copy the reference.
This problem sometimes caused crashes when extracting
symlinks from ISO9660 images.

Thanks to: Diego "Flameeyes" Pettenò
2007-03-01 06:22:34 +00:00
Bruce M Simpson b32fedf48f stub call to addr2ascii().
Noticed by:	brooks
2007-03-01 02:11:57 +00:00
Matt Jacob 4c38f2f8bc Update the isp man page.
MFC after:	2 weeks
2007-02-28 23:21:51 +00:00
Paolo Pisati e0526e6088 Update bus_setup_intr() man page after recent newbus modification:
o uniform the driver_intr_t parameter name to 'ithread'

o delete any reference to INTR_FAST

o document a bit the difference between the filter and ithread
  argument

Reviewed by: mdoc-police (ru)
2007-02-28 23:13:41 +00:00
Juli Mallett a905106075 Increase helpfulness in diagnostic message - ypbind running without -ypset or
-ypsetme will prevent use of ypset.  Remind the user to check that it was
started correctly.
2007-02-28 22:49:12 +00:00
Christian Brueffer 5e01c01abd More cleanup for rev. 1.56
Submitted by:	ru
2007-02-28 22:40:21 +00:00
Bruce M Simpson 12c3456003 Prepare for 802.1p:
Add macro EVL_APPLY_VLID() which may be used to apply an 802.1q VLAN ID
 to the M_VLANTAG field in an mbuf packet header non-destructively.
 This will be used by net80211 to begin with.

 Add macro EVL_APPLY_PRI() which may be used to apply an 802.1p priority
 class to the M_VLANTAG field in an mbuf packet header non-destructively.

 Add other macros for manipulating tags and the CFI bit.

Submitted by:	Boris Kovalenko (EVL_CFIOFTAG(), EVL_MAKETAG())
2007-02-28 22:05:30 +00:00
Bruce M Simpson 00cf3f55fb Add comments about common idioms for cleanup pass at a later date. 2007-02-28 21:58:37 +00:00
Christian Brueffer 3eb3f72aca mdoc cleanup for the previous commit and touch .Dd 2007-02-28 21:36:11 +00:00
Bruce M Simpson 80a653019e Document removal of addr2ascii/ascii2addr and addition of AF_LINK
support for getnameinfo.
2007-02-28 21:33:40 +00:00
Bruce M Simpson 160a2e5504 Document the AF_LINK extension which was imported from NetBSD. 2007-02-28 21:28:33 +00:00
Bruce M Simpson 67228c4621 Nuke ascii2addr() and addr2ascii(). They have no consumers anywhere
in FreeBSD, and originated from INRIA IPv6.

Stub out netstat reference to addr2ascii() I mistakenly introduced.
Update misleading man page sections.

Merge NetBSD's getnameinfo() AF_LINK extensions for a portable way to
print link-layer addresses given a sockaddr_dl(), minus the IEEE 1394
bits which don't map directly to our code.

Obtained from:	NetBSD (getnameinfo.c)
Discussed on:	current (March 2006)
2007-02-28 21:18:38 +00:00
Mohan Srinivasan 4a32dc299f In the SYN_SENT case, Initialize the snd_wnd before the call to tcp_mss().
The TCP hostcache logic in tcp_mss() depends on the snd_wnd being initialized.
2007-02-28 20:48:00 +00:00
Bruce M Simpson cd88c37218 Remove code which would never be used, viz a viz Quality-of-Service;
the token bucket filter got killed in netinet, so it gets killed here
too. Correct comments.
2007-02-28 20:32:25 +00:00
Bruce M Simpson 430fc8f211 Add a comment about a struct which needs to be global.
Remove an unused global variable.
Staticize variables which do not need to be global.
2007-02-28 20:29:20 +00:00
Ruslan Ermilov 51804c7973 Resurrect one of the patches from attic and refine the
lib32 build somewhat.  Specifically, instead of spamming
${CC} et al with -I${LIB32TMP}/usr/include which can be
harmful (as has been demonstrated by the ncursesw WIP),
use slightly different approach to achieve the same goal.
This also simplifies things a bit.

Prodded by:	rafan
2007-02-28 20:06:21 +00:00
Bruce M Simpson 85e0793497 Style: Move declaration of subsystem mutex to where other
mutexes are in this file, and use macros for dealing with it.
2007-02-28 20:02:24 +00:00
Mohan Srinivasan 535c755253 Update the tcp(4) manpage with the new (and some older undocumented) sysctls.
Remove a sysctl that is no longer used.
2007-02-28 19:32:46 +00:00
Thomas Quinot f59aa46799 Minor reformatting. 2007-02-28 16:51:52 +00:00
Andrey A. Chernov ff6df61440 International code for Russian Ruble is changed from RUR to RUB
starting from 1.1.2001 (ISO 4217)
2007-02-28 16:28:49 +00:00
Gleb Smirnoff 8bec3467b1 Add EHOSTDOWN and ENETUNREACH to the list of soft errors, that shouldn't
be returned up to the caller.

PR:		100172
Submitted by:	"Andrew - Supernews" <andrew supernews.net>
Reviewed by:	rwatson, bms
2007-02-28 12:47:49 +00:00
Gleb Smirnoff 72757d9a53 Toss the code, that handles errors from ip_output(), to make it more
readable:
- Merge two embedded if() into one.
- Introduce switch() block to handle different kinds of errors.

Reviewed by:	rwatson, bms
2007-02-28 12:41:49 +00:00
Ruslan Ermilov 975ab35963 Fix markup. 2007-02-28 10:29:48 +00:00
Ruslan Ermilov 98d8b7924f Fix a nit noticed during translation. 2007-02-28 10:24:34 +00:00
Ruslan Ermilov ac4c858b19 Backport markup fixes from a translated version of a manpage. 2007-02-28 10:22:19 +00:00
Ruslan Ermilov fbccd9db48 Check in some insignificant fixes obtained as a result of
the translation work.
2007-02-28 10:19:25 +00:00
Ruslan Ermilov 081fa92f3b - Adopt the short description from POSIX as it better matches the
utility name.

- Fix a bug in description: the range preceded by a dash selects
  up to the last number, not first.
2007-02-28 10:13:32 +00:00
Ruslan Ermilov 9620e9dd97 Revert previous change and take back a pointy hat. 2007-02-28 09:04:46 +00:00
Robert Watson 3592fd4de5 Lock unp2 after checking for a non-NULL unp2 pointer in uipc_send() on
datagram UNIX domain sockets, not before.
2007-02-28 08:08:50 +00:00
Ruslan Ermilov 7b6b0e6d24 Fix panic on boot caused by setting up a NULL interrupt handler.
Submitted by:	Goran Gajic
Pointy hat to:	piso
2007-02-28 05:29:23 +00:00
Pawel Jakub Dawidek 1d1f5f8560 Add a comment for PRIV_NET_SETLLADDR.
OK'ed by:	rwatson
2007-02-27 23:38:58 +00:00
Greg Lehey 8866174561 Furhter clarifications:
- the issues with wakeup_one are due to address space clashes between
  unrelated groups of threads.
- sleep() was removed in FreeBSD 2.2.
- date the page today, not 4 days ago.
- replace grammatically correct "woken" with "woken up" for
  consistency with the function name.
2007-02-27 23:09:31 +00:00