svn commit: r203583 - user/kmacy/head_flowtable_v6/sys/net

Kip Macy kmacy at FreeBSD.org
Sun Feb 7 00:26:48 UTC 2010


Author: kmacy
Date: Sun Feb  7 00:26:47 2010
New Revision: 203583
URL: http://svn.freebsd.org/changeset/base/203583

Log:
  simplify print_tuple
  fix call

Modified:
  user/kmacy/head_flowtable_v6/sys/net/flowtable.c

Modified: user/kmacy/head_flowtable_v6/sys/net/flowtable.c
==============================================================================
--- user/kmacy/head_flowtable_v6/sys/net/flowtable.c	Sun Feb  7 00:08:26 2010	(r203582)
+++ user/kmacy/head_flowtable_v6/sys/net/flowtable.c	Sun Feb  7 00:26:47 2010	(r203583)
@@ -459,8 +459,8 @@ ipv4_flow_print_tuple(int flags, int pro
 	char saddr[4*sizeof "123"], daddr[4*sizeof "123"];
 
 	if (flags & FL_HASH_ALL) {
-		inet_ntoa_r(*(struct in_addr *) &dsin->sin_addr, daddr);
-		inet_ntoa_r(*(struct in_addr *) &ssin->sin_addr, saddr);
+		inet_ntoa_r(ssin->sin_addr, saddr);
+		inet_ntoa_r(dsin->sin_addr, daddr);
 		printf("proto=%d %s:%d->%s:%d\n",
 		    proto, saddr, ntohs(ssin->sin_port), daddr,
 		    ntohs(dsin->sin_port));
@@ -967,9 +967,9 @@ kern_flowtable_insert(struct flowtable *
 	    "kern_flowtable_insert: hash=0x%x fibnum=%d flags=0x%x\n",
 	    hash, fibnum, flags);
 #ifdef FLOWTABLE_DEBUG
-	if (*flags & FL_DEBUG)
+	if (flags & FL_DEBUG)
 		ipv4_flow_print_tuple(flags, flags_to_proto(flags),
-		    (struct sockaddr_in *)&ssa, (struct sockaddr_in *)&dsa);
+		    (struct sockaddr_in *)ssa, (struct sockaddr_in *)dsa);
 #endif	
 	return (flowtable_insert(ft, hash, key, fibnum, ro, flags));
 }


More information about the svn-src-user mailing list