LPF vs Sockets/DHCP Relaying via GRE tunnel

Bram bram-qupc-hfref at lists.wizbit.be
Thu Nov 24 20:59:55 UTC 2011


Hi,


I'm having a problem with relaying dhcp requests, using dhcrelay, via  
a GRE tunnel.
Googling  for this suggests that it does not work with LPF but that it  
does work with '#define USE_SOCKETS' in includes/site.h.

Building a dhcrelay with 'USE_SOCKETS' does work but leads to some questions:

a) what are the advantages/disadvantages of 'USE_SOCKETS' and LPF?


b) what is the impact of changing this on dhclient and dhcpd?

includes/site.h contains:
/* Define USE_SOCKETS to use the standard BSD socket API.

    On many systems, the BSD socket API does not provide the ability to
    send packets to the 255.255.255.255 broadcast address, which can
    prevent some clients (e.g., Win95) from seeing replies.   This is
    not a problem on Solaris.

    In addition, the BSD socket API will not work when more than one
    network interface is configured on the server.

    However, the BSD socket API is about as efficient as you can get, so if
    the aforementioned problems do not matter to you, or if no other
    API is supported for your system, you may want to go with it. */


Are these comment still relevant?
Can changing this break dhclient and/or dhcpd? [dhclient and dhcpd  
will be used in situations where more then one interface is configured  
and used]
Via google I found some post that mention that dhclient may have  
problems with USE_SOCKETS.. these post were 'old' (I have not, yet,  
further investigated this).

Obviously I can build two versions: dhcpd and dhclient without  
USE_SOCKETS and dhcrelay with USE_SOCKETS but I would prefer not doing  
this unless it's really necessary...


c) does it make sense to add support for GRE tunnels in the LPF code?

I've been investigating this route and I have a proof of concept patch  
(against an older version of dhcp).
If this route makes sense then I can update the patch to make it work  
with the most recent version but I prefer to do this only after it's  
determined if this make sense or not.



Any thoughts?


Best regards,

Bram






More information about the dhcp-users mailing list