search for: tcphdr

Displaying 20 results from an estimated 32 matches for "tcphdr".

2003 Aug 02
1
[SECURITY] Netfilter Security Advisory: NAT Remote DOS (SACK mangle)
...4.21-pre7-sackadjust/net/ipv4/netfilter/ip_nat_helper.c --- linux-2.4.21-pre7/net/ipv4/netfilter/ip_nat_helper.c 2003-04-06 15:26:4= 8.000000000 +1000 +++ working-2.4.21-pre7-sackadjust/net/ipv4/netfilter/ip_nat_helper.c 2003-= 04-14 23:18:38.000000000 +1000 @@ -366,54 +365,49 @@ sack_adjust(struct tcphdr *tcph,=20 } =09 =20 -/* TCP SACK sequence number adjustment, return 0 if sack found and adjuste= d */ -static inline int +/* TCP SACK sequence number adjustment. */ +static inline void ip_nat_sack_adjust(struct sk_buff *skb, - struct ip_conntrack *ct, - enum ip_conntrack_info ctinfo) +...
2011 Aug 21
6
[Bug 738] New: reading beyond buffer limits in nf_conntrack_proto_tcp.c::tcp_options()
http://bugzilla.netfilter.org/show_bug.cgi?id=738 Summary: reading beyond buffer limits in nf_conntrack_proto_tcp.c::tcp_options() Product: netfilter/iptables Version: unspecified Platform: All OS/Version: All Status: NEW Severity: minor Priority: P2 Component: nf_conntrack
2016 Jul 04
1
[PATCH] core/lwip: Avoid 3-second delay for a half-open connection
...100644 --- a/core/lwip/src/core/tcp_in.c +++ b/core/lwip/src/core/tcp_in.c @@ -675,6 +675,9 @@ tcp_process(struct tcp_pcb *pcb) /* send a RST to bring the other side in a non-synchronized state. */ tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), ip_current_src_addr(), tcphdr->dest, tcphdr->src); + /* Resend SYN immediately to establish connection */ + pcb->rtime = 0; + tcp_rexmit_rto(pcb); } break; case SYN_RCVD: -- 2.3.8
2017 Jan 19
0
[Bug 1113] New: integer overflow in xt_TCPMSS
...ken packets (special generated) --- /home/pavel/make/linux-3.16.39/net/netfilter/xt_TCPMSS.c 2016-11-20 06:17:41.000000000 +0500 +++ ./xt_TCPMSS.c 2016-04-05 13:32:05.000000000 +0500 @@ -126,7 +126,7 @@ newmss = info->mss; opt = (u_int8_t *)tcph; - for (i = sizeof(struct tcphdr); i <= tcp_hdrlen - TCPOLEN_MSS; i += optlen(opt, i)) { + for (i = sizeof(struct tcphdr); i + TCPOLEN_MSS <= tcp_hdrlen; i += optlen(opt, i)) { if (opt[i] == TCPOPT_MSS && opt[i+1] == TCPOLEN_MSS) { u_int16_t oldmss; -- You are receiving this mail because: Y...
2001 Dec 24
2
OpenSSH-3.0.2p1 and Linux libc5
.../bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/usr/libexec/sftp-server\" -D_PATH_SSH_PIDDIR=\"/var/run\" -DHAVE_CONFIG_H -c packet.c In file included from packet.c:62: /usr/include/linux/tcp.h:23: redefinition of `struct tcphdr' so I fell back to adding the following: #define TCP_NODELAY 1 Brute force, but it works. Regards, Richard.... Permanent: rgooch at atnf.csiro.au Current: rgooch at ras.ucalgary.ca
2005 Oct 14
5
[PATCH] Fix NAT for domU checksum offload
...ack)) { + return 1; + } + } + return 0; +} + +static int +tcp_manip_pkt(struct sk_buff **pskb, + unsigned int iphdroff, + const struct ip_conntrack_tuple *tuple, + enum ip_nat_manip_type maniptype) +{ + struct iphdr *iph = (struct iphdr *)((*pskb)->data + iphdroff); + struct tcphdr *hdr; + unsigned int hdroff = iphdroff + iph->ihl*4; + u32 oldip, newip; + u16 *portptr, newport, oldport; + int hdrsize = 8; /* TCP connection tracking guarantees this much */ + + /* this could be a inner header returned in icmp packet; in such + cases we cannot update the checksum field sin...
2014 Oct 11
0
[PATCH net-next RFC 3/3] virtio-net: conditionally enable tx interrupt
...end(&stats->tx_syncp); after the loop. > + return sent; > +} > + ... > + > +static bool virtnet_skb_needs_intr(struct sk_buff *skb) > +{ > + union { > + unsigned char *network; > + struct iphdr *ipv4; > + struct ipv6hdr *ipv6; > + } hdr; > + struct tcphdr *th = tcp_hdr(skb); > + u16 payload_len; > + > + hdr.network = skb_network_header(skb); > + > + /* Only IPv4/IPv6 with TCP is supported */ Oh well, yet another packet flow dissector :) If most packets were caught by your implementation, you could use it for fast patj and fallback...
2014 Oct 11
2
[PATCH net-next RFC 3/3] virtio-net: conditionally enable tx interrupt
...num_sg, + skb, GFP_ATOMIC); + else + return virtqueue_add_outbuf(sq->vq, sq->sg, num_sg, skb, + GFP_ATOMIC); +} + +static bool virtnet_skb_needs_intr(struct sk_buff *skb) +{ + union { + unsigned char *network; + struct iphdr *ipv4; + struct ipv6hdr *ipv6; + } hdr; + struct tcphdr *th = tcp_hdr(skb); + u16 payload_len; + + hdr.network = skb_network_header(skb); + + /* Only IPv4/IPv6 with TCP is supported */ + if ((skb->protocol == htons(ETH_P_IP)) && + hdr.ipv4->protocol == IPPROTO_TCP) { + payload_len = ntohs(hdr.ipv4->tot_len) - hdr.ipv4->ihl * 4 -...
2014 Oct 11
2
[PATCH net-next RFC 3/3] virtio-net: conditionally enable tx interrupt
...num_sg, + skb, GFP_ATOMIC); + else + return virtqueue_add_outbuf(sq->vq, sq->sg, num_sg, skb, + GFP_ATOMIC); +} + +static bool virtnet_skb_needs_intr(struct sk_buff *skb) +{ + union { + unsigned char *network; + struct iphdr *ipv4; + struct ipv6hdr *ipv6; + } hdr; + struct tcphdr *th = tcp_hdr(skb); + u16 payload_len; + + hdr.network = skb_network_header(skb); + + /* Only IPv4/IPv6 with TCP is supported */ + if ((skb->protocol == htons(ETH_P_IP)) && + hdr.ipv4->protocol == IPPROTO_TCP) { + payload_len = ntohs(hdr.ipv4->tot_len) - hdr.ipv4->ihl * 4 -...
2006 Apr 11
2
FreeBSD 6.0 panics - sbdrop
...ot;\024\000\000\000\000????\033\b???\211?X?\231??\033\b?x\034\b??M\211?G\000\000\000\b\000\000\000(\000\b?(\000l?" sbuf = "\0003\234?l\033\b?\200???\0003\234?\224\033\b??\201\211?\0003\234?\000\000\000\000\000\000\000\000\000?\226?\027\000\000\000\020(??" th = (struct tcphdr *) 0xc1b2f824 ip = (struct ip *) 0xc1b2f810 inp = (struct inpcb *) 0xc3ec5ca8 optp = (u_char *) 0xc1b2f838 "\001\001\b\n:\r?\027\004?\236?#E?W" optlen = 12 len = 69 tlen = 0 off = 32 drop_hdrlen = 52 tp = (struct tcpc...
2012 Jul 24
2
Broadcom NetXtreme bcm5720 in the 9.1 beta
Team I have a Dell PowerEdge R720xd, with the Broadcom NetXtreme bcm5720. I found the following thread: http://forums.freebsd.org/showthread.php?t=31769 I find I am unable to use the NIC's (there are 4 on the server). When we put a cable into it we get a "watchdog timeout -- resetting" error, and the machine will pause for 5 or so seconds. IP may or may not come up randomly.
2006 Feb 22
0
Re: [PATCH] Fix IPSec for Xen checksum offload packets (Jon Mason)
...t;+ goto out; > skb->h.raw = (unsigned char *)skb->nh.iph + 4*skb->nh.iph->ihl; > if (skb->h.raw >= skb->tail) >- goto out_kfree_skb; >+ goto out; > switch (skb->nh.iph->protocol) { > case IPPROTO_TCP: > skb->csum = offsetof(struct tcphdr, check); >@@ -1284,18 +1224,89 @@ > skb->csum = offsetof(struct udphdr, check); > break; > default: >- if (net_ratelimit()) >- printk(KERN_ERR "Attempting to checksum a non-" >- "TCP/UDP packet, dropping a protocol" >-...
2014 Oct 14
0
[PATCH net-next RFC 3/3] virtio-net: conditionally enable tx interrupt
...rtqueue_add_outbuf(sq->vq, sq->sg, num_sg, skb, > + GFP_ATOMIC); > +} > + > +static bool virtnet_skb_needs_intr(struct sk_buff *skb) > +{ > + union { > + unsigned char *network; > + struct iphdr *ipv4; > + struct ipv6hdr *ipv6; > + } hdr; > + struct tcphdr *th = tcp_hdr(skb); > + u16 payload_len; > + > + hdr.network = skb_network_header(skb); > + > + /* Only IPv4/IPv6 with TCP is supported */ > + if ((skb->protocol == htons(ETH_P_IP)) && > + hdr.ipv4->protocol == IPPROTO_TCP) { > + payload_len = ntohs(hdr.ip...
2006 Jul 06
12
kernel BUG at net/core/dev.c:1133!
Looks like the GSO is involved? I got this while running Dom0 only (no guests), with a BOINC/Rosetta@home application running on all 4 cores. changeset: 10649:8e55c5c11475 Build: x86_32p (pae). ------------[ cut here ]------------ kernel BUG at net/core/dev.c:1133! invalid opcode: 0000 [#1] SMP CPU: 0 EIP: 0061:[<c04dceb0>] Not tainted VLI EFLAGS: 00210297 (2.6.16.13-xen
2009 Oct 06
1
[PATCH 2.6.32-rc3] net: VMware virtual Ethernet NIC driver: vmxnet3
...xnet3_parse_and_copy_hdr(struct sk_buff *skb, struct vmxnet3_tx_queue *tq, + struct vmxnet3_tx_ctx *ctx, + struct vmxnet3_adapter *adapter) +{ + struct Vmxnet3_TxDataDesc *tdd; + + if (ctx->mss) { + ctx->eth_ip_hdr_size = skb_transport_offset(skb); + ctx->l4_hdr_size = ((struct tcphdr *) + skb_transport_header(skb))->doff * 4; + ctx->copy_size = ctx->eth_ip_hdr_size + ctx->l4_hdr_size; + } else { + unsigned int pull_size; + + if (skb->ip_summed == CHECKSUM_PARTIAL) { + ctx->eth_ip_hdr_size = skb_transport_offset(skb); + + if (ctx->ipv4) { + s...
2009 Oct 06
1
[PATCH 2.6.32-rc3] net: VMware virtual Ethernet NIC driver: vmxnet3
...xnet3_parse_and_copy_hdr(struct sk_buff *skb, struct vmxnet3_tx_queue *tq, + struct vmxnet3_tx_ctx *ctx, + struct vmxnet3_adapter *adapter) +{ + struct Vmxnet3_TxDataDesc *tdd; + + if (ctx->mss) { + ctx->eth_ip_hdr_size = skb_transport_offset(skb); + ctx->l4_hdr_size = ((struct tcphdr *) + skb_transport_header(skb))->doff * 4; + ctx->copy_size = ctx->eth_ip_hdr_size + ctx->l4_hdr_size; + } else { + unsigned int pull_size; + + if (skb->ip_summed == CHECKSUM_PARTIAL) { + ctx->eth_ip_hdr_size = skb_transport_offset(skb); + + if (ctx->ipv4) { + s...
2009 Oct 12
1
[PATCH 2.6.32-rc4] net: VMware virtual Ethernet NIC driver: vmxnet3
...xnet3_parse_and_copy_hdr(struct sk_buff *skb, struct vmxnet3_tx_queue *tq, + struct vmxnet3_tx_ctx *ctx, + struct vmxnet3_adapter *adapter) +{ + struct Vmxnet3_TxDataDesc *tdd; + + if (ctx->mss) { + ctx->eth_ip_hdr_size = skb_transport_offset(skb); + ctx->l4_hdr_size = ((struct tcphdr *) + skb_transport_header(skb))->doff * 4; + ctx->copy_size = ctx->eth_ip_hdr_size + ctx->l4_hdr_size; + } else { + unsigned int pull_size; + + if (skb->ip_summed == CHECKSUM_PARTIAL) { + ctx->eth_ip_hdr_size = skb_transport_offset(skb); + + if (ctx->ipv4) { + s...
2009 Oct 12
1
[PATCH 2.6.32-rc4] net: VMware virtual Ethernet NIC driver: vmxnet3
...xnet3_parse_and_copy_hdr(struct sk_buff *skb, struct vmxnet3_tx_queue *tq, + struct vmxnet3_tx_ctx *ctx, + struct vmxnet3_adapter *adapter) +{ + struct Vmxnet3_TxDataDesc *tdd; + + if (ctx->mss) { + ctx->eth_ip_hdr_size = skb_transport_offset(skb); + ctx->l4_hdr_size = ((struct tcphdr *) + skb_transport_header(skb))->doff * 4; + ctx->copy_size = ctx->eth_ip_hdr_size + ctx->l4_hdr_size; + } else { + unsigned int pull_size; + + if (skb->ip_summed == CHECKSUM_PARTIAL) { + ctx->eth_ip_hdr_size = skb_transport_offset(skb); + + if (ctx->ipv4) { + s...
2009 Sep 30
4
[PATCH 2.6.32-rc1] net: VMware virtual Ethernet NIC driver: vmxnet3
...xnet3_parse_and_copy_hdr(struct sk_buff *skb, struct vmxnet3_tx_queue *tq, + struct vmxnet3_tx_ctx *ctx, + struct vmxnet3_adapter *adapter) +{ + struct Vmxnet3_TxDataDesc *tdd; + + if (ctx->mss) { + ctx->eth_ip_hdr_size = skb_transport_offset(skb); + ctx->l4_hdr_size = ((struct tcphdr *) + skb_transport_header(skb))->doff * 4; + ctx->copy_size = ctx->eth_ip_hdr_size + ctx->l4_hdr_size; + } else { + unsigned int pull_size; + + if (skb->ip_summed == CHECKSUM_PARTIAL) { + ctx->eth_ip_hdr_size = skb_transport_offset(skb); + + if (ctx->ipv4) { + s...
2009 Sep 30
4
[PATCH 2.6.32-rc1] net: VMware virtual Ethernet NIC driver: vmxnet3
...xnet3_parse_and_copy_hdr(struct sk_buff *skb, struct vmxnet3_tx_queue *tq, + struct vmxnet3_tx_ctx *ctx, + struct vmxnet3_adapter *adapter) +{ + struct Vmxnet3_TxDataDesc *tdd; + + if (ctx->mss) { + ctx->eth_ip_hdr_size = skb_transport_offset(skb); + ctx->l4_hdr_size = ((struct tcphdr *) + skb_transport_header(skb))->doff * 4; + ctx->copy_size = ctx->eth_ip_hdr_size + ctx->l4_hdr_size; + } else { + unsigned int pull_size; + + if (skb->ip_summed == CHECKSUM_PARTIAL) { + ctx->eth_ip_hdr_size = skb_transport_offset(skb); + + if (ctx->ipv4) { + s...