Created
July 10, 2015 08:38
-
-
Save tomaskrcka/f017a27d6fefc6c1adb0 to your computer and use it in GitHub Desktop.
Forced adding of dhcp option to dhcp response to coova-chilli version 1.2.8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- coova-chilli-1.2.8_orig/src/dhcp.c 2011-07-12 11:10:15.000000000 +0200 | |
+++ coova-chilli-1.2.8/src/dhcp.c 2014-07-23 13:25:16.000000000 +0200 | |
@@ -2470,21 +2470,12 @@ dhcp_create_pkt(uint8_t type, uint8_t *p | |
uint8_t *lhead = _options.dhcp_options; | |
struct dhcp_tag_t *opt = (struct dhcp_tag_t *)lhead; | |
while (opt && opt->t && opt->l) { | |
- int param_count = param_list->l; | |
- int i; | |
- | |
log_dbg("DHCP Type: %d Length: %d", (int)opt->t, (int)opt->l); | |
- /* for each configured option, iterate the param_list */ | |
- for (i=0; i < param_count; i++) { | |
- if (param_list->v[i] == opt->t) { | |
- if (pos + opt->l + 2 < DHCP_OPTIONS_LEN) { | |
- memcpy(&pack_dhcp->options[pos], opt, | |
- opt->l + 2); | |
- pos += opt->l + 2; | |
- } | |
- break; | |
- } | |
+ if (pos + opt->l + 2 < DHCP_OPTIONS_LEN) { | |
+ memcpy(&pack_dhcp->options[pos], opt, | |
+ opt->l + 2); | |
+ pos += opt->l + 2; | |
} | |
lhead += opt->l + 2; |
Hi, can you give us an example of using ?
Thanks.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Originally the dhcp option was added if it was requested.