Skip to content

dhcpv6: switch every Option to parse using FromBytes - #491

Merged
hugelgupf merged 5 commits into
insomniacslk:masterfrom
hugelgupf:frombytes
Feb 20, 2023
Merged

dhcpv6: switch every Option to parse using FromBytes#491
hugelgupf merged 5 commits into
insomniacslk:masterfrom
hugelgupf:frombytes

Conversation

@hugelgupf

Copy link
Copy Markdown
Collaborator

Adds

FromBytes([]byte) error

type to the Option interface.

This is a pre-requisite for doing either #487 or lazy option parsing. I'm experimenting with both, and unhappy with everything I come up with, so for now I want to merge this improvement.

Signed-off-by: Chris Koch <chrisko@google.com>
Signed-off-by: Chris Koch <chrisko@google.com>
Signed-off-by: Chris Koch <chrisko@google.com>
Signed-off-by: Chris Koch <chrisko@google.com>
Tests that for the correct option code, the correct deserialization is
applied.

Signed-off-by: Chris Koch <chrisko@google.com>
@codecov

codecov Bot commented Feb 20, 2023

Copy link
Copy Markdown

Codecov Report

Base: 69.46% // Head: 69.55% // Increases project coverage by +0.09% 🎉

Coverage data is based on head (16b6fd4) compared to base (5989848).
Patch coverage: 85.35% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #491      +/-   ##
==========================================
+ Coverage   69.46%   69.55%   +0.09%     
==========================================
  Files          90       90              
  Lines        5737     5656      -81     
==========================================
- Hits         3985     3934      -51     
+ Misses       1571     1546      -25     
+ Partials      181      176       -5     
Impacted Files Coverage Δ
dhcpv6/dhcpv6message.go 56.85% <0.00%> (+0.25%) ⬆️
dhcpv6/options.go 78.65% <57.89%> (+5.82%) ⬆️
dhcpv6/option_ntp_server.go 66.66% <68.00%> (+3.25%) ⬆️
dhcpv6/option_fqdn.go 83.33% <80.00%> (-0.88%) ⬇️
dhcpv6/option_4rd.go 83.90% <100.00%> (-0.71%) ⬇️
dhcpv6/option_archtype.go 100.00% <100.00%> (ø)
dhcpv6/option_bootfileparam.go 86.36% <100.00%> (+9.44%) ⬆️
dhcpv6/option_bootfileurl.go 100.00% <100.00%> (ø)
dhcpv6/option_clientid.go 100.00% <100.00%> (ø)
dhcpv6/option_clientlinklayeraddress.go 100.00% <100.00%> (ø)
... and 24 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@hugelgupf
hugelgupf requested a review from pmazzini February 20, 2023 03:47
@hugelgupf
hugelgupf marked this pull request as ready for review February 20, 2023 03:48
@hugelgupf
hugelgupf merged commit 5369909 into insomniacslk:master Feb 20, 2023
@hugelgupf
hugelgupf deleted the frombytes branch February 20, 2023 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants