Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Ensure that Dhcp_client.input does not raise an exception #6

Merged
merged 2 commits into from
Nov 23, 2016

Conversation

avsm
Copy link
Contributor

@avsm avsm commented Nov 23, 2016

This breaks mirage -t macosx since the Vmnet interface sprays
all sorts of multicast packets which are not valid DHCP packets.

A future improvement to this layer is probably to listen on the
right DHCP ports, but this unbreaks OSX mirage for now.

This breaks `mirage -t macosx` since the Vmnet interface sprays
all sorts of multicast packets which are not valid DHCP packets.

A future improvement to this layer is probably to listen on the
right DHCP ports, but this unbreaks OSX mirage for now.
@hannesm
Copy link
Contributor

hannesm commented Nov 23, 2016

IMHO we should do the opposite, and fix Dhcp_wire.pkt_of_buf to not throw (it already uses a result type)... also, pretty strange API to take a buf and its len..

@yomimono yomimono merged commit b33b1ef into yomimono:master Nov 23, 2016
@avsm
Copy link
Contributor Author

avsm commented Nov 24, 2016

hannesm: yes agreed re: pkt_of_buf, although i think it should probably throw internally for the step-by-step parsing and then the outer interface should turn that into a Result (to avoid byte-by-byte parsing allocations)

@avsm avsm deleted the exception-safe branch November 24, 2016 11:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants