PERFORCE change 113795 for review

Paolo Pisati piso at FreeBSD.org
Wed Jan 31 21:26:38 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=113795

Change 113795 by piso at piso_newluxor on 2007/01/31 21:26:33

	Revert previous modifications to Fragment[In|Out] too:
	as they are only called from LibAlias[In|Out]Locked() and need just a contiguos
	ip hdr, we can safely hand them a "struct ip *" (as the actual ip hdr pullup
	is done in LibAlias[In|Out]Locked() - see previous commit).

Affected files ...

.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#47 edit

Differences ...

==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#47 (text+ko) ====

@@ -1146,21 +1146,14 @@
 */
 
 /* Local prototypes */
-static int	FragmentIn(struct libalias *, void *);
-static int	FragmentOut(struct libalias *, void *);
+static int	FragmentIn(struct libalias *, struct ip *);
+static int	FragmentOut(struct libalias *, struct ip *);
 
 
 static int
-FragmentIn(struct libalias *la, void *ptr)
+FragmentIn(struct libalias *la, struct ip *pip)
 {
 	struct alias_link *lnk;
-	struct ip *pip;
-#ifdef _KERNEL
-	// XXX - m_pullup()
-	pip = ptr;
-#else
-	pip = ptr;
-#endif
 
 	LIBALIAS_LOCK_ASSERT(la);
 	lnk = FindFragmentIn2(la, pip->ip_src, pip->ip_dst, pip->ip_id);
@@ -1179,16 +1172,9 @@
 
 
 static int
-FragmentOut(struct libalias *la, void *ptr)
+FragmentOut(struct libalias *la, struct ip *pip)
 {
-	struct ip *pip;
 	struct in_addr alias_address;
-#ifdef _KERNEL
-	// XXX m_pullup()
-	pip = ptr;
-#else
-	pip = ptr;
-#endif
 
 	LIBALIAS_LOCK_ASSERT(la);
 	alias_address = FindAliasAddress(la, pip->ip_src);


More information about the p4-projects mailing list