[Click] dhcp cookie
Eddie Kohler
kohler at cs.ucla.edu
Tue Jul 17 23:18:50 EDT 2007
Nick,
Thanks so much for this patch! I tried to apply it a long time ago but
confused myself; eventually based on the RFCs you are right. There are a
couple other places in the code that followed the same pattern that you didn't
mention, so I just changed them. Hopefully I will test the result.
Eddie
Nick wrote:
> Hi,
>
> I think in package dhcp, in
> DHCPClient::make_discovery
> it should be
> memcpy(&(discover_msg->magic), DHCP_OPTIONS_COOKIE, 4);
> option_ptr = discover_msg->options;
> instead of
> memcpy(discover_msg->options, DHCP_OPTIONS_COOKIE, 4);
> option_ptr = discover_msg->options + 4;
>
> and in DHCPClient::make_release
> memcpy((unsigned char*)&(release_msg->magic), DHCP_OPTIONS_COOKIE, 4);
> option_ptr = release_msg->options;
> instead of
> memcpy(release_msg->options, DHCP_OPTIONS_COOKIE, 4);
> option_ptr = release_msg->options + 4;
>
> otherwise I think the packages are not created correctly and seem to be
> dropped.
>
> Nick
> PS. Hopefully this is the correct place to send this... If not excuse
> me. Btw click is cool!
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
More information about the click
mailing list