patch-1.3.67 linux/net/ipv4/ip_fw.c

Next file: linux/net/ipv4/packet.c
Previous file: linux/net/ipv4/af_inet.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.66/linux/net/ipv4/ip_fw.c linux/net/ipv4/ip_fw.c
@@ -905,7 +905,7 @@
  		}
  		else ms->timer.expires = jiffies+MASQUERADE_EXPIRE_TCP;
  
-		skb->csum = csum_partial(th + 1, size - sizeof(*th), 0);
+		skb->csum = csum_partial((void *)(th + 1), size - sizeof(*th), 0);
  		tcp_send_check(th,iph->saddr,iph->daddr,size,skb);
  	}
  	add_timer(&ms->timer);
@@ -1011,7 +1011,7 @@
 #endif
 					}
 				}
-				skb->csum = csum_partial(portptr + sizeof(struct tcphdr),
+				skb->csum = csum_partial((void *)(((struct tcphdr *)portptr) + 1),
 					size - sizeof(struct tcphdr), 0);
  				tcp_send_check((struct tcphdr *)portptr,iph->saddr,iph->daddr,size,skb);
  			}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this