DHCPv6: Add support for sending Option 17 (VSIO)#374
DHCPv6: Add support for sending Option 17 (VSIO)#374spoljak-ent wants to merge 0 commit intoNetworkConfiguration:masterfrom
Conversation
rsmarples
left a comment
There was a problem hiding this comment.
Can we wrap this in #ifndef SMALL please so we don't bloat the code for installations where size matters?
src/dhcp6.c
Outdated
| vlen = 0; | ||
|
|
||
| for (i = 0, vsio6 = ifo->vsio6; i < ifo->vsio6_len; | ||
| i++, vsio6++) { |
There was a problem hiding this comment.
Rather than increment two things, we can just increment vsio6.
For this to work we need to work out the address of the final pointer using vsio6_len.
*vsio6_endp = ifo->vsio6 + ifo->vsio6_len and then compare.
I would front load this in the variable declaration at the top to reduce the number of lines the for loop takes up.
src/dhcp6.c
Outdated
| if (vsio6->en != en) | ||
| continue; | ||
| vlen += 2 * sizeof(uint16_t) + vsio6->len; | ||
| } |
There was a problem hiding this comment.
This should be one indent to the left.
src/dhcp6.c
Outdated
| p += sizeof(pen); | ||
|
|
||
| for (i = 0, vsio6 = ifo->vsio6; i < ifo->vsio6_len; | ||
| i++, vsio6++) { |
No problem... Just to be sure, the whole implementation or some specific lines? |
Whole implementation please. |
|
Hi,
I made a patch for the support of sending DHCPv6 Option 17.
The options can be added similarly to the current vendor option 43.
Just add in config file as many options as needed like this:
vsio ent_num opt_num,option
Please comment and review.
Thanks.