Subject: Re: Relayed lease extension

From: Bernie Volz <[email-masked]>
Date: Thu, 27 Apr 2000 16:49:22 -0400

Wim Janssen wrote:
>
>Bernie Volz wrote:
>> 
>> I wonder whether a solution to this is to send the response back to the
>> sender's IP address. In other words, just use the "from" information in
>> the recvfrom call in the sendto. In "normal" UDP applications, that is
>> what is done (such as for DNS and NFS).
>
>This would be OK for me. The only problem perhaps is that there are lots
>of DHCP servers working differently ...

That is true. Was your question HOW do most servers act today (do they
explicit follow the standard or not)? 

>
>> One might consider a slight deviation of that for added security 
>
>... and it may introduce a possible security leak.
>
>> and
>> that is to check that the from address is either (a) the ciaddr of the
>> client or (b) the giaddr. If neither, drop the packet as it likely is
>> spoofed (this doesn't really prevent spoofing as the sender could simply
>> set giaddr to its address).
>
>The added security check should not be done if you have a RAS with multiple 
>network cards acting as a relay agent. The 'giaddr' could be a hint for 
>the server to fetch IP addresses from its pools. But it doesn't need 
>to be the source address of the packet, since the DHCP server could 
>very well be sitting on another interface of the RAS. Usually an 
>application should take the 'best' IP address to reach the server, no?

Yes, in the simple socket model the sender doesn't specify the source
address (the UDP/IP layer picks it based on the interface). Of course,
one can always bind to a specific source address (the giaddr) before
sending.

So, it is possible (if care isn't used) that the giaddr and the source
address could be different. But, it is usually easy to fix that
behavoir (bind to the giaddr).

>Wim

- Bernie

---

From: Ted Lemon <[email-masked]>
Date: Thu, 27 Apr 2000 14:13:16 -0700

> behavoir (bind to the giaddr).

If it doesn't say something in the spec, and you decide that you're
going to be picky about that thing anyway, you're likely to have
interoperability problems.  I was actually bitten by this with the
client and the server identifier option.  Given that the spec is
explicit about where to send DHCP messages, I think it would be a
mistake to send them elsewhere.

			       _MelloN_

---

From: Wim Janssen <[email-masked]>
Date: Thu, 27 Apr 2000 14:20:54 -0700

Bernie Volz wrote:
> That is true. Was your question HOW do most servers act today 

Actually, yes, that's what I was ultimately trying to figure out.
And as well trying to get a guideline of how it is supposed to work.

> (do they

My question to get there, was: what _is_ the standard in this case?
(looking at my quotes of the RFC).

I currently tried to relay a lease extension with 'giaddr' filled in, with
two different -respectable- servers, and they both handle this differently: 
one sends to 'ciaddr', the other one to 'giaddr'.

Wim