-
Notifications
You must be signed in to change notification settings - Fork 5.1k
quiche: add EnvoyQuicPacketWriter with sendmsg to set source address #7416
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
Conversation
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
/retest |
🔨 rebuilding |
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.
Buffer::InstancePtr result_buffer(new Buffer::OwnedImpl()); | ||
const uint64_t bytes_to_read = 11; | ||
const uint64_t bytes_to_read = payload.length(); | ||
// Make receive buffer 1 byte larger for trailling '\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.
typo "trailling" (feel free to fix in your next PR)
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.
done
@danzh1989 I suspect the coverage error is a legit timing error. It looks like something might be hanging on one of the UDP tests. /wait |
Signed-off-by: Dan Zhang <danzh@google.com>
@danzh2010 sorry this is going to need a master merge due to #7457 /wait |
/retest |
🤷♀️ nothing to rebuild. |
/retest |
🤷♀️ nothing to rebuild. |
/retest |
🤷♀️ nothing to rebuild. |
/acp rerun |
/azp rerun |
Command 'rerun' is not supported by Azure Pipelines. Supported commands
See additional documentation. |
/azp run envoy-macos |
Azure Pipelines successfully started running 1 pipeline(s). |
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, will merge once 1.11 is cut.
// if it's not specified in cmsghdr. | ||
send_from_addr.reset(new Address::Ipv6Instance( | ||
#ifdef IP_FREEBIND | ||
"::9", |
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.
@danzh2010 this one cause problems during Google Envoy import. It seems we don't support the ability to bind to ::9 like this on our internal test farm. One of the issues that seems to exist here is that we assume that a compile time support for IP_FREEBIND translates to runtime ability. Do you think you could express this differently? CC @dnoe @yanavlasov
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.
@danzh2010 this one cause problems during Google Envoy import. It seems we don't support the ability > to bind to ::9 like this on our internal test farm. One of the issues that seems to exist here is that we
assume that a compile time support for IP_FREEBIND translates to runtime ability.
This might has walk-around, I'll check our test infrastructure about it.
Do you think you could express this differently? CC @dnoe @yanavlasov
It's hard to test it in a different way as we need an v6 address that we can use to send which is different from what kernel would have picked for us. An compromise is we always use ::1 for v6, but this will leave v6 behavior untested.
EnvoyQuicPacketWriter calls UdpListener::send() to write packet.
Modify IoSocketHandleImpl::sendmsg() to take source ip address and used it in ancillary data.
Risk Level: low, udp listener is not in use.
Testing: Added unit tests for EnvoyQuicPacketWriter and integration test for UdpListener to send self address.
Part of #2557