From owner-freebsd-isdn Sat Jul 11 08:09:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA09102 for freebsd-isdn-outgoing; Sat, 11 Jul 1998 08:09:06 -0700 (PDT) (envelope-from owner-freebsd-isdn@FreeBSD.ORG) Received: from cyclone.degnet.baynet.de (www.degnet.baynet.de [194.95.214.129]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id IAA09096 for ; Sat, 11 Jul 1998 08:09:04 -0700 (PDT) (envelope-from malte@webmore.com) Received: from neuron.webmore.com (unverified [194.95.214.167]) by cyclone.degnet.baynet.de (EMWAC SMTPRS 0.83) with SMTP id ; Sat, 11 Jul 1998 17:10:22 +0200 Received: (from malte@webmore.com) by neuron.webmore.com (8.8.8/8.8.8) id RAA00419; Sat, 11 Jul 1998 17:08:07 +0200 (CEST) Message-ID: X-Mailer: XFMail 1.2 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <87n2ahls66.fsf@olymp.sax.de> Date: Sat, 11 Jul 1998 17:08:07 +0200 (CEST) Reply-To: malte@webmore.com From: Malte Lance To: Michael Hohmuth Subject: Re: fallback-IP-addr for dyn. dials. Is there any use for it ? Cc: hm@hcs.de, freebsd-isdn@FreeBSD.ORG Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On 10-Jul-98 Michael Hohmuth wrote: > Malte Lance writes: > >> Generally i want to know if there is any use for my changes to sppp. >> Over the weekend i've hacked sppp. The goal was: >> - extend spppcontrol to take an IP-addr as an argument for >> fallback-assignment to the interface (isppp) when the connection >> closes (in 'dynamic local IP-addr assignment'-mode for dialup). >> - hack if_spppsubr.c to handle fallback-assignment correct. > >> Why did i do that: >> - For dialups with dynamic addr assignment in sppp the local IP-addr on >> the interface when not connected is usually 0.0.0.0 > > Unless you assign the interface an IP address before connecting. This > is what I do: As i said: "dialups with dynamic addr" So you have to assign 0.0.0.0 for the sppp-device. In the current-version, this is the only way to configure sppp for dynamic local IP-addr assignment. Otherwise sppp does not agree to an IP-addr given by the peer in ipcp unless it is the IP-addr the sppp-device was configured with. The local address 0.0.0.0 is the trigger for dynamic IP-addr handling in the current version of sppp (as you know). > > Here, the interface is assigned 141.76.92.31 before connection, and > this IP address has been allowed to send out data in the firewall > configuration. Therefore, autodial works. > >> For this to work with a deny-by-default firewall-setup, i always was >> forced to add an additional pass-rule for the address 0.0.0.0 to any. >> Without such a rule, the firewall would block all packets with the >> source addr 0.0.0.0 and as a result, no dialup would be triggered. > > I also use a firewall setup, but I don't need a firewall configuration > entry for 0.0.0.0 to have `isdnd' dial automatically. Also, the IP > address is not reset when disconnecting. When sppp0 was configured with 0.0.0.0 it will be set back to 0.0.0.0 after the connection closes as you will find in the original code for closing ipcp: if_spppsubr.c: -------------- static void sppp_ipcp_close(struct sppp *sp) { sppp_close_event(&ipcp, sp); if (sp->ipcp.flags & IPCP_MYADDR_DYN) /* * My address was dynamic, clear it again. */ sppp_set_ip_addr(sp, 0L); } > > I have to admit, however, that I'm always assigned the same IP > address. I haven't thought about how to configure the firewall if I > was assigned a different IP address each time. Yes and that's the situation i have written the changes for. Malte. > >> Now i am wondering if my changes to the sppp-code are of any use to anyone ? >> - Is there any use for it ? >> - Is there use for it to be added to the public sppp-code ? >> (<=> is there use for it to be sent to Hellmuth ?) > > Perhaps you should check first whether my approach is general enough > to support your setup? > > Michael > -- > hohmuth@innocent.com, hohmuth@inf.tu-dresden.de > http://home.pages.de/~hohmuth/ > ---------------------------------- E-Mail: Malte Lance Date: 10-Jul-98 Time: 19:38:10 ---------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message