Send kea-dev mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/kea-dev
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of kea-dev digest..."


Today's Topics:

   1.  fixing the hostname issue (alexis)


----------------------------------------------------------------------

Message: 1
Date: Sat, 15 Nov 2014 21:11:57 -0300
From: alexis <[email protected]>
To: [email protected]
Subject: [kea-dev] fixing the hostname issue
Message-ID:
        <CADN=mdtqsyu1--x1qddjv-ei9v8nhkawkx04-_m_8nwny0g...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Guys, im working on this and i need your help. Please could you help me
pointing me where im wrong on this


on pkt4_receive in my hooks im setting a new hostname. So when dhcp4_srv
call this hook receives this

then on dhcp4_srv.cc in

Dhcpv4Srv::processDiscover(Pkt4Ptr& discover) {


there's a


 processClientName(discover, offer);


so

Dhcpv4Srv::processClientName(const Pkt4Ptr& query, Pkt4Ptr& answer) {

i've added

 try {
        LOG_DEBUG(dhcp4_logger, DBG_DHCP4_DETAIL_DATA,
DHCP4_CLIENT_NAME_PROC_FAIL).arg("++++++++++++++++++++++");
        Option4ClientFqdnPtr fqdn =
boost::dynamic_pointer_cast<Option4ClientFqdn>
            (query->getOption(DHO_FQDN));
        if (fqdn) {
        LOG_DEBUG(dhcp4_logger, DBG_DHCP4_DETAIL_DATA,
DHCP4_CLIENT_NAME_PROC_FAIL).arg("detecta opcion de fqdn");
            processClientFqdnOption(fqdn, answer);

        } else {
            OptionStringPtr hostname =
boost::dynamic_pointer_cast<OptionString>
                (query->getOption(DHO_HOST_NAME));
            if (hostname) {
        LOG_DEBUG(dhcp4_logger, DBG_DHCP4_DETAIL_DATA,
DHCP4_CLIENT_NAME_PROC_FAIL).arg("detecta opcion de hostname");
                processHostnameOption(hostname, answer);
            }
        }
    }

nothing is logged at all (im able to see dhcp4 logger)

Following this as i set option 12, this should match

           if (hostname) {
        LOG_DEBUG(dhcp4_logger, DBG_DHCP4_DETAIL_DATA,
DHCP4_CLIENT_NAME_PROC_FAIL).arg("detecta opcion de hostname");
                processHostnameOption(hostname, answer);
            }



Dhcpv4Srv::processHostnameOption(const OptionStringPtr& opt_hostname,
                                 Pkt4Ptr& answer) {



contains conditions based on label_count and calls

d2_mgr.qualifyName(hostname)

where

std::string
        D2ClientMgr::qualifyName(const std::string& partial_name) const {


contains this

// Tack on a trailing dot in case suffix doesn't have one.
            //    std::string str = gen_name.str();
            //    size_t len = str.length();
            //    if ((len > 0) && (str[len - 1] != '.')) {
            //        gen_name << ".";
            //    }

where i guess is the problem when the hostname is not a fqdn and gets the .
appended.


am i ok? after modify this im doing

make clean
make
make install

on dir src/


by now, i have no luck, cant even see this line

        LOG_DEBUG(dhcp4_logger, DBG_DHCP4_DETAIL_DATA,
DHCP4_CLIENT_NAME_PROC_FAIL).arg("++++++++++++++++++++++");


thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<https://lists.isc.org/pipermail/kea-dev/attachments/20141115/87d439eb/attachment-0001.html>

------------------------------

_______________________________________________
kea-dev mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/kea-dev

End of kea-dev Digest, Vol 8, Issue 5
*************************************

Reply via email to