dhclient raw socket?

Schmidt, Jolynn Jolynn.Schmidt at nasdaq.com
Fri Jan 26 15:57:33 UTC 2007


David W. Hankins wrote:
>Linux uses something we call 'LPF', it's the Linux variety of the
>BPF.  It'll require some options be configured in the kernel, so
>since you're making an initrd...

I have my new dhclient-script written and I have recompiled the kernel
but want to make sure all of the parts are correct.  Once I have enabled
netfilters I have various other options that are available.  Do I need
any of these?  I have an embedded system so keeping the kernel small is
important.  Can I get away with just netfilter?

> CONFIG_NETFILTER=y


>I'm not sure what you mean.  The stock linux client script is already
>pretty simple.

When looking at the dhclient-script used by Fedora it sources files and
uses outside functions so it was hard for me to trace down where the [
x$var = x ] syntax comes from since I had never seen it before.  I never
found any documentation on this and just came to the conclusion that is
a function of dhclient and not bash (maybe wrong?)  So, simple as in I
don't need to worry about checking old vs new IP's since this is only
run in an initrd image during a pxe install.  I am just doing a bunch of
stuff like this:

    if [ -n "$new_host_name" ]; then
        /bin/hostname $new_host_name
        echo "HOSTNAME=$new_host_name" >> $INFO
        [ -n "$new_ip_address" ] && echo "$new_ip_address
$new_host_name" >> $HOSTS
    fi

 But yes, if I can read the script then it has to be simple and I was
able to do that with the dhclient-script. =)

Thanks for your help.



More information about the dhcp-users mailing list