SuSE Support Database

Title: dynamic IP numbers: first package gets lost

---

Mainpage ---- Searchform ---- History ---- Versions ---- Categories ---- Contents
Deutsch
---

dynamic IP numbers: first package gets lost

Applies to

Kernel: Versions since 2.0.30

Symptom:

There is a syncPPP connection using dynamic IPs. Dial on demand works. Anyway, the first IP package gets lost.

Example: You select a webpage, the connection is established but you will only see the site after a Reload.

Cause:

The netinterface has been configured using a certain IP. This is handed forward with the first package as address. As soon as the connection is established you will be assigned a new IP. Now, the first package is send but as the return address is now wrong you will never get an answer (or the answer will be send to another address).

Solution:

The solution is rather simple. Just retain the first package until the new IP is known.
  1. There is a solution from kernel 2.0.31 onwards (exactly: pre-patch-2.0.31-5).
  2. The S.u.S.E.-Version of kernel 2.0.30 (Paket lx-suse) does already contain this patch.
For this to work you have to pass a parameter (value) to the kernel: This should be done before the 4l subsystem is launched! We recommend to do this in /sbin/init.d/boot.local.

Just for making sure: there should be something like

[..]
Sep 30 10:36:04 wilma ipppd[729]: local  IP address 10.10.129.228
Sep 30 10:36:04 wilma ipppd[729]: remote IP address 192.44.86.9
Sep 30 10:36:08 wilma kernel: ip_fw_masquerade(): change maddr from 192.168.42.1
 to 10.10.129.228
in /var/log/messages (using echo 2) if it was successful. Hint: This only works (up to 2.0.32) if the connection is established from a masqeraded address. If this is done by the Linux machine itself it doesn't work.

The following patch should solve this problem. Thanks to Erik Correy

--- linux/net/ipv4/tcp_output.c Thu Oct 16 15:38:49 1997
+++ linux-2.0.31pre9-ec/net/ipv4/tcp_output.c   Thu Oct 16 15:03:36 1997
@@ -578,7 +560,7 @@
                                }
                        }
                        skb->raddr=rt->rt_gateway;
-                       if (skb->dev !=dev && sk->state == TCP_SYN_SENT && sysctl_ip_dynaddr)
+                       if ((skb->dev !=dev || skb->dev->pa_addr != skb->ip_hdr->saddr) && sk->state == TCP_SYN_SENT && sysctl_ip_dynaddr)
                                 ip_rewrite_addrs(sk, skb, dev);
                        skb->dev=dev;
                        skb->arp=1;
Thanks to: Christian Meyer (smart@on-line.de)

---

See also:

---

Keywords: ISDN, SYNCPPP, IPPPD, DIAL ON DEMAND, DYNAMISCHE IP-NUMMERN, PAKET GEHT VERLOREN

---

Categories: PPP

---

Feedback welcome: Send Mail to kfr@suse.de (Please give the following subject: SDB-dynippatch)

---

Mainpage ---- Searchform ---- History ---- Versions ---- Categories ---- Contents
Deutsch
---

SDB-dynippatch, Copyright SuSE GmbH, Nuremberg, Germany - Version: 11. Sep 1997
Impressum - Last generated: 24. Feb 1999 14:46:07 by maddin with sdb_gen 1.00.0