-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gnrc_ndp_internal: add capability to add external options to NAs #3747
gnrc_ndp_internal: add capability to add external options to NAs #3747
Conversation
|
||
if (pkt == NULL) { | ||
DEBUG("ndp internal: error allocating Target Link-layer address option.\n"); | ||
gnrc_pktbuf_release(pkt); | ||
gnrc_pktbuf_release(ext_opts); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't ext_opts
rather be released on the caller side (if desired) by indicating an error as a return value? I am just thinking: The caller might want to reuse the pktsnip, if gnrc_ndp_opt_tl2a_build
fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the other hand: the releases of pkt
below release ext_opts, too. So this would be inconsistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, then I would opt for a good documentation for now, stating that ext_ops
could be modified after the call to gnrc_ndp_internal_send_nbr_adv
please adjust the call to |
Done |
42e7619
to
4a075cd
Compare
ACK, squash and GO. |
4a075cd
to
82924c6
Compare
Squashed. |
and go |
…opts gnrc_ndp_internal: add capability to add external options to NAs
Thanks for the quick review :) |
6LoWPAN-ND adds the address registration option (ARO) which can be part of either Neighbor Solicitations (NSs) or Neighbor Advertisements (NAs). The value of the status field in the advertised ARO is dependent on the ARO provided by an NS, so the value of the option must be set out of the scope of the send function. This API change allows for that in the least intrusive way, by allowing to add preallocated options to the send function.