Skip to content

Add dest addr information to incoming UDPPacket objects#5704

Merged
maskit merged 1 commit intoapache:masterfrom
maskit:udp_packet_dest_addr
Jul 23, 2019
Merged

Add dest addr information to incoming UDPPacket objects#5704
maskit merged 1 commit intoapache:masterfrom
maskit:udp_packet_dest_addr

Conversation

@maskit
Copy link
Member

@maskit maskit commented Jul 10, 2019

Destination addr is not stored into incoming UDP packets.

QUIC implementation needs to know the address for connection migration (a new connection may use different network route, IP address).

This is required for QUIC support.

@maskit maskit added the UDP label Jul 10, 2019
@maskit maskit added this to the 9.0.0 milestone Jul 10, 2019
@maskit maskit self-assigned this Jul 10, 2019
@maskit maskit mentioned this pull request Jul 10, 2019
12 tasks
@bryancall
Copy link
Contributor

[approve ci clang-analyzer]

@maskit
Copy link
Member Author

maskit commented Jul 17, 2019

This is blocking merging QUIC branch, which will be a part of 9.0 release. Please review this as soon as possible..

@zwoop
Copy link
Contributor

zwoop commented Jul 19, 2019

@scw00 Can you review please ?

scw00
scw00 previously approved these changes Jul 22, 2019
Copy link
Member

@scw00 scw00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has been working finely in quic branch for a long time.

if (opt.ip_family == AF_INET) {
int enable = 1;
#ifdef IP_PKTINFO
safe_setsockopt(fd, IPPROTO_IP, IP_PKTINFO, reinterpret_cast<char *>(&enable), sizeof(enable));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nikpick: should we continue when setsockopt failed ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added error checks. It's complicated a bit, because it fails even if IP_PKTINFO is defined and try the other to support various platforms.

@zwoop
Copy link
Contributor

zwoop commented Jul 22, 2019

Blocks #5457

@maskit maskit force-pushed the udp_packet_dest_addr branch from 78ccaa3 to cac7e6b Compare July 23, 2019 01:36
@maskit
Copy link
Member Author

maskit commented Jul 23, 2019

@scw00 I added error checks. Please take another look and approve again if it's ok with you.

Copy link
Member

@scw00 scw00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@maskit maskit merged commit 78995bf into apache:master Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants