patch-2.3.12 linux/net/ipv4/tcp_ipv4.c
Next file: linux/scripts/ver_linux
Previous file: linux/mm/mmap.c
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
Thu Jul 22 13:18:12 1999
- Orig file:
v2.3.11/linux/net/ipv4/tcp_ipv4.c
- Orig date:
Thu Jul 8 15:42:21 1999
diff -u --recursive --new-file v2.3.11/linux/net/ipv4/tcp_ipv4.c linux/net/ipv4/tcp_ipv4.c
@@ -401,10 +401,9 @@
* The sockhash lock must be held as a reader here.
*/
static inline struct sock *__tcp_v4_lookup(u32 saddr, u16 sport,
- u32 daddr, u16 dport, int dif)
+ u32 daddr, u16 hnum, int dif)
{
TCP_V4_ADDR_COOKIE(acookie, saddr, daddr)
- __u16 hnum = ntohs(dport);
__u32 ports = TCP_COMBINED_PORTS(sport, hnum);
struct sock *sk;
int hash;
@@ -439,7 +438,7 @@
struct sock *sk;
SOCKHASH_LOCK_READ();
- sk = __tcp_v4_lookup(saddr, sport, daddr, dport, dif);
+ sk = __tcp_v4_lookup(saddr, sport, daddr, ntohs(dport), dif);
SOCKHASH_UNLOCK_READ();
return sk;
@@ -1729,7 +1728,7 @@
#endif
SOCKHASH_LOCK_READ_BH();
sk = __tcp_v4_lookup(skb->nh.iph->saddr, th->source,
- skb->nh.iph->daddr, th->dest, skb->dev->ifindex);
+ skb->nh.iph->daddr, ntohs(th->dest), skb->dev->ifindex);
SOCKHASH_UNLOCK_READ_BH();
#ifdef CONFIG_IP_TRANSPARENT_PROXY
if (!sk)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)