Date: Thu, 7 Dec 2006 15:20:07 GMT From: Paolo Pisati <piso@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 111246 for review Message-ID: <200612071520.kB7FK70q086685@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=111246 Change 111246 by piso@piso_newluxor on 2006/12/07 15:19:58 Backout change 111230. Affected files ... .. //depot/projects/soc2005/libalias/sys/netinet/ip_fw2.c#31 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#25 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.h#9 edit Differences ... ==== //depot/projects/soc2005/libalias/sys/netinet/ip_fw2.c#31 (text+ko) ==== @@ -3469,10 +3469,8 @@ ((ipfw_insn_nat *)cmd)->nat = t; } - if (m->m_pkthdr.len > MJUM16BYTES) - printf("fat pkt: %d\n", m->m_pkthdr.len); - if ((mcl = m_jumbo16pullup(m, - m->m_pkthdr.len)) == NULL) + if ((mcl = m_megapullup(m, m->m_pkthdr.len)) == + NULL) goto badnat; ip = mtod(mcl, struct ip *); if (args->eh == NULL) { @@ -3536,10 +3534,10 @@ c = mtod(mcl, char *); if (oif == NULL) retval = LibAliasIn(t->lib, c, - MJUM16BYTES); + MCLBYTES); else retval = LibAliasOut(t->lib, c, - MJUM16BYTES); + MCLBYTES); if (retval != PKT_ALIAS_OK) { /* XXX - should i add some logging? */ m_free(mcl); ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#25 (text+ko) ==== @@ -1656,29 +1656,4 @@ m_freem(m); return (NULL); } - -struct mbuf * -m_jumbo16pullup(struct mbuf *m, int len) { - struct mbuf *mcl; - caddr_t cp; - - if (len > MJUM16BYTES) - goto bad; - - if ((mcl = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, - MJUM16BYTES)) == NULL) - goto bad; - - cp = mtod(mcl, caddr_t); - m_copydata(m, 0, len, cp); - m_move_pkthdr(mcl, m); - mcl->m_len = mcl->m_pkthdr.len; - m_freem(m); - - return (mcl); -bad: - m_freem(m); - return (NULL); -} - #endif ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.h#9 (text+ko) ==== @@ -191,7 +191,6 @@ /* Mbuf helper function. */ struct mbuf *m_megapullup(struct mbuf *, int); -struct mbuf *m_jumbo16pullup(struct mbuf *, int); /* * Mode flags and other constants.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612071520.kB7FK70q086685>