lkml.org 
[lkml]   [2001]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRE: Fix for Real Audio IP Masquerade
Date
Also attaching a file of the diff since stuff got munged through the email.

-----Original Message-----
From: Villalovos, John L [mailto:john.l.villalovos@intel.com]
Sent: Wednesday, January 03, 2001 4:17 PM
To: 'linux-kernel@vger.kernel.org'
Cc: 'jjciarla@raiz.uncu.edu.ar'
Subject: Fix for Real Audio IP Masquerade


Diff against 2.2.19pre6 though the file hasn't changed since Oct 27, 1998.

This fixes a problem in the ip_masq_raudio.c module where it assumes that
all TCP headers are 20 bytes long. Some implementations of the Real Player
clients use the TCP options section of the TCP header. Thus these TCP
headers are longer than 20 bytes long and then break the RTSP portion of the
IP masquerading code. This fix uses the header length field in the TCP
header to calculate the correct offset into the data portion of the TCP
packet.

John



--- ip_masq_raudio.c Tue Oct 27 09:57:19 1998
+++ /usr/src/linux/net/ipv4/ip_masq_raudio.c Wed Jan 3 16:03:21 2001
@@ -169,7 +169,10 @@
skb = *skb_p;
iph = skb->nh.iph;
th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]);
- data = (char *)&th[1];
+
+ /* Make sure we take into account the size of the TCP packet. This
is
+ * because there may be TCP options in the TCP packet */
+ data = ((char *)&th[0]) + (th->doff * 4);

data_limit = skb->h.raw + skb->len;

@@ -315,7 +318,10 @@
skb = *skb_p;
iph = skb->nh.iph;
th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]);
- data = (char *)&th[1];
+
+ /* Make sure we take into account the size of the TCP packet. This
is
+ * because there may be TCP options in the TCP packet */
+ data = ((char *)&th[0]) + (th->doff * 4);

data_limit = skb->h.raw + skb->len;

John Villalovos
Intel Corporation
2111 NE 25TH AVE STOP JF2-70
HILLSBORO, OR 97124-5961
(503) 264-1320 Fax: (503) 264-6380
GPG 1.+/PGP 5.+/ DSS/Diffie Helman
http://www.sodarock.com/JohnVillalovos-gpgkey.txt
1024D/1A25D86C 2F24 AD89 E5D5 C92B 7FE2 F878 7ED5 2D38 1A25 D86C

[unhandled content-type:application/octet-stream]
\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.023 / U:0.628 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site