From owner-freebsd-current Sun Aug 27 17:17:55 2000 Delivered-To: freebsd-current@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 3F23B37B424; Sun, 27 Aug 2000 17:17:50 -0700 (PDT) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id UAA21141; Sun, 27 Aug 2000 20:17:48 -0400 (EDT) (envelope-from wollman) Date: Sun, 27 Aug 2000 20:17:48 -0400 (EDT) From: Garrett Wollman Message-Id: <200008280017.UAA21141@khavrinen.lcs.mit.edu> To: Archie Cobbs Cc: freebsd-net@FreeBSD.ORG, freebsd-current@FreeBSD.ORG Subject: Proposal to clarify mbuf handling rules In-Reply-To: <200008272125.OAA66159@bubba.whistle.com> References: <200008272125.OAA66159@bubba.whistle.com> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG < said: > However, many routines that take an mbuf parameter assume that the > mbuf given to them is modifiable and proceed to write all over it. s/assume/require as a necessary precondition/ It's not a coding error, it's part of the specification. No, it's not documented -- but it's pretty clear from the design of the original code. > 3. For any routines that do need to modify mbuf data, but don't > assume anything about the mbuf, alter those routines to do > an m_pullup() when necessary to make the data are they are > working on modifiable. m_pullup is evil. It would be better to fix the places (i.e., ip_input and ip_output) which make the modification necessary. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message