Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Jul 1998 17:08:07 +0200 (CEST)
From:      Malte Lance <malte@webmore.com>
To:        Michael Hohmuth <hohmuth@innocent.com>
Cc:        hm@hcs.de, freebsd-isdn@FreeBSD.ORG
Subject:   Re: fallback-IP-addr for dyn. dials. Is there any use for it ?
Message-ID:  <XFMail.980711170807.malte@webmore.com>
In-Reply-To: <87n2ahls66.fsf@olymp.sax.de>

next in thread | previous in thread | raw e-mail | index | archive | help

On 10-Jul-98 Michael Hohmuth wrote:
> Malte Lance <malte@webmore.com> 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).

<configuring and starting isdnd snipped>
> 
> 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 <malte@webmore.com>
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.980711170807.malte>