-
-
Notifications
You must be signed in to change notification settings - Fork 169
add ip4config2 + http protocols support #1614
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
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks for your contribution, looks good! I left a few remarks.
Further, before this can be merged: Please add a integration test to uefi-test-runner
similar to our other protocol tests. To prevent flakiness, I'd say you try to get a HTTP Response from any of [google.com, example.com, amazon.com]
and if any responds positive, the test succeeds.
I think we need a network device for the integration test. Not sure if we have one at the moment. Feel ree to reach out in case you need guidance.
Hmm, I guess that calls for bringing in https://gitlab.com/kraxel/virt-firmware-rs/-/blob/main/efi-apps/src/net/ip4config2.rs first. That probably needs a few more refinements though, right now it simply uses
What is used for the tests? qemu I guess? |
draft: #1615 |
You can run the integration tests using Here you can find an example for how a protocol integration test was added: |
status_code: HttpStatusCode::STATUS_UNSUPPORTED, | ||
}; | ||
|
||
let mut body = vec![0; if expect_body { 16 * 1024 } else { 0 }]; |
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.
16 * 1024? Where do these numbers come from?
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.
16k buffer for the body. Figured by experimenting a bit. I havn't seen the uefi protocol return more in one call. Often it is much less though, between 1000 + 1500 (payload of one ethernet frame?).
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.
LGTM, thanks for working on this! I'll wait for a second review of Nicholas before we merge this.
|
||
// hard to find web sites which still allow plain http these days ... | ||
info!("Testing HTTP"); | ||
let Some(_) = fetch_http(*h, "http://boot.netboot.xyz/robots.txt") else { |
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.
How about http://example.com
? (And https://example.com
for below)
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.
Oh, didn't now example.com actually exists.
Problem is that https connections to example.com do not work with current ovmf builds.
tianocore/edk2#10962
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.
Until ovmf works with https://example.com, how about example.com
for http, and github.com
for https? If github.com was inaccessible then CI probably wouldn't work anyway, so it seems like an OK website to rely on.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This is needed for https support (tls server certificate verification). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Ok, works locally but fails in CI, apparently the prebuilt binaries do not have TLS support included |
temporary stopgap, can be reverted once the prebuilt ovmf binarties have https support included. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
The prebuilt OVMF files, you mean? I think we can fix that quite easily, can't we? @nicholasbishop |
This adds http protocol support.
Usage example: see
fn fetch_http
in https://gitlab.com/kraxel/virt-firmware-rs/-/blob/main/efi-apps/src/bin/netboot.rs