Date: Wed, 15 Apr 2009 20:55:20 +0000 (UTC) From: Paolo Pisati <piso@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r191122 - user/piso/ipfw/sys/netinet/libalias Message-ID: <200904152055.n3FKtKhh054539@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: piso Date: Wed Apr 15 20:55:20 2009 New Revision: 191122 URL: http://svn.freebsd.org/changeset/base/191122 Log: Make alias_dummy mbuf safe. Modified: user/piso/ipfw/sys/netinet/libalias/alias_dummy.c Modified: user/piso/ipfw/sys/netinet/libalias/alias_dummy.c ============================================================================== --- user/piso/ipfw/sys/netinet/libalias/alias_dummy.c Wed Apr 15 20:53:34 2009 (r191121) +++ user/piso/ipfw/sys/netinet/libalias/alias_dummy.c Wed Apr 15 20:55:20 2009 (r191122) @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); #endif static void -AliasHandleDummy(struct libalias *la, struct ip *ip, struct alias_data *ah); +AliasHandleDummy(struct libalias *la, pkt_t ptr, struct alias_data *ah); static int fingerprint(struct libalias *la, struct alias_data *ah) @@ -92,15 +92,8 @@ fingerprint(struct libalias *la, struct static int protohandler(struct libalias *la, pkt_t ptr, struct alias_data *ah) { - struct ip *pip; -#ifdef _KERNEL - if (ptr == NULL) - pip = (struct ip *)la->buf; - else -#endif - PULLUP_IPHDR(pip, ptr); - AliasHandleDummy(la, pip, ah); + AliasHandleDummy(la, ptr, ah); return (0); } @@ -117,7 +110,7 @@ struct proto_handler handlers [] = { .pri = 666, .dir = IN|OUT, .proto = UDP|TCP, - .legacy = 1, + .legacy = 0, .fingerprint = &fingerprint, .protohandler = &protohandler }, @@ -158,8 +151,7 @@ MODULE_DEPEND(alias_dummy, libalias, 1, #endif static void -AliasHandleDummy(struct libalias *la, struct ip *ip, struct alias_data *ah) +AliasHandleDummy(struct libalias *la, pkt_t ptr, struct alias_data *ah) { ; /* Dummy. */ } -
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904152055.n3FKtKhh054539>