mirror of
https://github.com/bol-van/zapret.git
synced 2025-04-19 05:22:58 +03:00
nfqws: checksum int => size_t
This commit is contained in:
parent
c2c8c83c03
commit
7c418a11f8
@ -119,17 +119,17 @@ uint16_t csum_ipv6_magic(const void *saddr, const void *daddr, size_t len, uint8
|
||||
}
|
||||
|
||||
|
||||
void tcp4_fix_checksum(struct tcphdr *tcp,int len, in_addr_t src_addr, in_addr_t dest_addr)
|
||||
void tcp4_fix_checksum(struct tcphdr *tcp,size_t len, in_addr_t src_addr, in_addr_t dest_addr)
|
||||
{
|
||||
tcp->check = 0;
|
||||
tcp->check = csum_tcpudp_magic(src_addr,dest_addr,len,IPPROTO_TCP,csum_partial(tcp, len));
|
||||
}
|
||||
void tcp6_fix_checksum(struct tcphdr *tcp,int len, const struct in6_addr *src_addr, const struct in6_addr *dest_addr)
|
||||
void tcp6_fix_checksum(struct tcphdr *tcp,size_t len, const struct in6_addr *src_addr, const struct in6_addr *dest_addr)
|
||||
{
|
||||
tcp->check = 0;
|
||||
tcp->check = csum_ipv6_magic(src_addr,dest_addr,len,IPPROTO_TCP,csum_partial(tcp, len));
|
||||
}
|
||||
void tcp_fix_checksum(struct tcphdr *tcp,int len,const struct iphdr *iphdr,const struct ip6_hdr *ip6hdr)
|
||||
void tcp_fix_checksum(struct tcphdr *tcp,size_t len,const struct iphdr *iphdr,const struct ip6_hdr *ip6hdr)
|
||||
{
|
||||
if (iphdr)
|
||||
tcp4_fix_checksum(tcp, len, iphdr->saddr, iphdr->daddr);
|
||||
|
@ -12,6 +12,6 @@ uint16_t csum_ipv6_magic(const void *saddr, const void *daddr, size_t len, uint8
|
||||
uint16_t ip4_compute_csum(const void *buff, size_t len);
|
||||
void ip4_fix_checksum(struct iphdr *ip);
|
||||
|
||||
void tcp4_fix_checksum(struct tcphdr *tcp,int len, in_addr_t src_addr, in_addr_t dest_addr);
|
||||
void tcp6_fix_checksum(struct tcphdr *tcp,int len, const struct in6_addr *src_addr, const struct in6_addr *dest_addr);
|
||||
void tcp_fix_checksum(struct tcphdr *tcp,int len,const struct iphdr *iphdr,const struct ip6_hdr *ip6hdr);
|
||||
void tcp4_fix_checksum(struct tcphdr *tcp,size_t len, in_addr_t src_addr, in_addr_t dest_addr);
|
||||
void tcp6_fix_checksum(struct tcphdr *tcp,size_t len, const struct in6_addr *src_addr, const struct in6_addr *dest_addr);
|
||||
void tcp_fix_checksum(struct tcphdr *tcp,size_t len,const struct iphdr *iphdr,const struct ip6_hdr *ip6hdr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user