Skip to content
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

Features/anonymityprofiles #76

Merged
merged 5 commits into from Dec 1, 2017
Merged

Conversation

@juga0
Copy link
Contributor

@juga0 juga0 commented Nov 30, 2017

Modifications to the packet to support the Anonymity Profiles (RFC 7844).

Thanks to @yomimono guide to find where the variables are and how to modify them.

@juga0 juga0 force-pushed the juga0:features/anonymityprofiles branch from ca055bb to 96e1159 Nov 30, 2017
@yomimono
Copy link
Contributor

@yomimono yomimono commented Dec 1, 2017

The build fails with:

# Error: Unbound constructor Private_classless_static_route

#       ocamlc lib/dhcp_wire.{cmo,cmt} (exit 2)

# (cd _build/default && /home/opam/.opam/4.03.0/bin/ocamlc.opt -w -40 -g -bin-annot -I /home/opam/.opam/4.03.0/lib/bytes -I /home/opam/.opam/4.03.0/lib/cstruct -I /home/opam/.opam/4.03.0/lib/fmt -I /home/opam/.opam/4.03.0/lib/io-page -I /home/opam/.opam/4.03.0/lib/ipaddr -I /home/opam/.opam/4.03.0/lib/logs -I /home/opam/.opam/4.03.0/lib/lwt -I /home/opam/.opam/4.03.0/lib/mirage-device -I /home/opam/.opam/4.03.0/lib/mirage-flow -I /home/opam/.opam/4.03.0/lib/mirage-net -I /home/opam/.opam/4.03.0/lib/mirage-net-lwt -I /home/opam/.opam/4.03.0/lib/mirage-profile -I /home/opam/.opam/4.03.0/lib/mirage-protocols -I /home/opam/.opam/4.03.0/lib/mirage-protocols-lwt -I /home/opam/.opam/4.03.0/lib/mirage-random -I /home/opam/.opam/4.03.0/lib/ocaml -I /home/opam/.opam/4.03.0/lib/ocplib-endian -I /home/opam/.opam/4.03.0/lib/randomconv -I /home/opam/.opam/4.03.0/lib/result -I /home/opam/.opam/4.03.0/lib/rresult -I /home/opam/.opam/4.03.0/lib/sexplib -I /home/opam/.opam/4.03.0/lib/sexplib/0 -I /home/opam/.opam/4.03.0/lib/tcpip -I /home/opam/.opam/4.03.0/lib/tcpip/ethif -I /home/opam/.opam/4.03.0/lib/tcpip/ipv4 -I /home/opam/.opam/4.03.0/lib/tcpip/udp -I /home/opam/.opam/4.03.0/lib/tcpip/unix -I /home/opam/.opam/4.03.0/lib/uchar -no-alias-deps -I lib -o lib/dhcp_wire.cmo -c -impl lib/dhcp_wire.pp.ml)

# File "lib/dhcp_wire.ml", line 1519, characters 24-54:

# Error: Unbound constructor Private_classless_static_route

I think an entry for Private_classless_static_route is missing in the dhcp_option type in dhcp_wire.ml (it is present in dhcp_wire.mli, but needs to be in both the interface and the code).

@@ -124,6 +141,7 @@ let create ?with_xid ?requests srcmac =
chaddr = srcmac;
options = [
Message_type DHCPDISCOVER;
Client_id (Id (Macaddr.to_string srcmac));

This comment has been minimized.

@yomimono

yomimono Dec 1, 2017
Contributor

This is my fault as I made the original suggestion (sorry!) but the Client_id variant allows for specifying the MAC address directly, as:

Client_id (Hwaddr srcmac)

rather than serializing the MAC and then passing the string, and I think that would be better.

This comment has been minimized.

@juga0

juga0 Dec 1, 2017
Author Contributor

No problem, changed to specify the MAC address directly. Thanks!

@juga0 juga0 force-pushed the juga0:features/anonymityprofiles branch from 31f6cdf to 458f5cf Dec 1, 2017
@juga0
Copy link
Contributor Author

@juga0 juga0 commented Dec 1, 2017

I think an entry for Private_classless_static_route is missing in the dhcp_option type

Yes, it was missing. Now it should build without errors.

@juga0 juga0 force-pushed the juga0:features/anonymityprofiles branch from 458f5cf to 5ec190d Dec 1, 2017
@yomimono yomimono merged commit b09d638 into mirage:master Dec 1, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.