Index: src/tcpedit/edit_packet.c
===================================================================
--- src/tcpedit/edit_packet.c	(revision 2648)
+++ src/tcpedit/edit_packet.c	(working copy)
@@ -124,13 +124,25 @@
 static u_int32_t
 randomize_ipv4_addr(tcpedit_t *tcpedit, u_int32_t ip)
 {
+    u_int32_t tempip;
     assert(tcpedit);
     
     /* don't rewrite broadcast addresses */
     if (tcpedit->skip_broadcast && !is_unicast_ipv4(tcpedit, ip))
         return ip;
-        
-    return ((ip ^ htonl(tcpedit->seed)) - (ip & htonl(tcpedit->seed)));
+
+    /* quick hack to make the --seed option to be an offset
+     * for the IP address rather then a seed for a randomization 
+     * function.  You really should use values which are a 
+     * multiple of 255 or strange things can happen
+     */
+    tempip = ntohl(ip);
+    if (tempip >= (0xffffffff - tcpedit->seed)) {
+        tempip -= (0xffffffff - tcpedit->seed + 1);
+    } else {
+        tempip += tcpedit->seed;
+    }
+    return htonl(tempip);
 }
 
 static void
