Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Nov 2007 21:18:34 GMT
From:      Paolo Pisati <piso@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 128750 for review
Message-ID:  <200711062118.lA6LIYee029234@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=128750

Change 128750 by piso@piso_newluxor on 2007/11/06 21:17:58

	Libalias now modifies the input mbuf, thus we have to put it back 
	into netgraph's item.

Affected files ...

.. //depot/projects/soc2005/libalias/sys/netgraph/ng_nat.c#12 edit

Differences ...

==== //depot/projects/soc2005/libalias/sys/netgraph/ng_nat.c#12 (text+ko) ====

@@ -284,12 +284,14 @@
 		rval = LibAliasIn(priv->lib, &m, 0);
 		if (rval != PKT_ALIAS_OK &&
 		    rval != PKT_ALIAS_FOUND_HEADER_FRAGMENT) {
+			NGI_M(item) = m;
 			NG_FREE_ITEM(item);
 			return (EINVAL);
 		}
 	} else if (hook == priv->out) {
 		rval = LibAliasOut(priv->lib, &m, 0);
 		if (rval != PKT_ALIAS_OK) {
+			NGI_M(item) = m;
 			NG_FREE_ITEM(item);
 			return (EINVAL);
 		}
@@ -355,7 +357,7 @@
 			ip->ip_len = htons(ip->ip_len);
 		}
 	}
-
+	NGI_M(item) = m;
 send:
 	if (hook == priv->in)
 		NG_FWD_ITEM_HOOK(error, item, priv->out);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711062118.lA6LIYee029234>