[Bug 1809795] [NEW] getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, sa, &salen) is in fact sometimes returning the source IP instead the destination IP.
roobesh ganapathy mohandass
1809795 at bugs.launchpad.net
Wed Dec 26 10:11:58 UTC 2018
Public bug reported:
We are using below version of Ubuntu/kernel,
~# lsb_release -rd
Description: Ubuntu 18.04.1 LTS
Release: 18.04
What you expected to happen:
getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, sa, &salen) - should return always destination IP(connected IP).
What happened instead:
getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, sa, &salen) is in fact sometimes returning the source IP instead the destination IP. Using getsockname() instead looks like solving the issue.
For just an example: Out of 6569124 requests , 4 requests were wrong
0.000060891 % (this is just an rough estimate to give you idea on
frequency)
Some old reference:
https://stackoverflow.com/questions/11417187/getsockopt-so-original-dst-occasionally-returns-client-address
We searched in launchpad for any bug filed for this but couldn't see
any. Hence filing this behavior here.
Side Note: (about how we identified this behavior)
We were using haproxy-version 1.8.14-1 which is using this kernel function getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, sa, &salen) to get the destination IP details/connected address details. But instead we are getting very occasional source IP address instead of destination(Connected IP).
** Affects: dpkg (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dpkg in Ubuntu.
https://bugs.launchpad.net/bugs/1809795
Title:
getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, sa, &salen) is in fact
sometimes returning the source IP instead the destination IP.
Status in dpkg package in Ubuntu:
New
Bug description:
We are using below version of Ubuntu/kernel,
~# lsb_release -rd
Description: Ubuntu 18.04.1 LTS
Release: 18.04
What you expected to happen:
getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, sa, &salen) - should return always destination IP(connected IP).
What happened instead:
getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, sa, &salen) is in fact sometimes returning the source IP instead the destination IP. Using getsockname() instead looks like solving the issue.
For just an example: Out of 6569124 requests , 4 requests were wrong
0.000060891 % (this is just an rough estimate to give you idea on
frequency)
Some old reference:
https://stackoverflow.com/questions/11417187/getsockopt-so-original-dst-occasionally-returns-client-address
We searched in launchpad for any bug filed for this but couldn't see
any. Hence filing this behavior here.
Side Note: (about how we identified this behavior)
We were using haproxy-version 1.8.14-1 which is using this kernel function getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, sa, &salen) to get the destination IP details/connected address details. But instead we are getting very occasional source IP address instead of destination(Connected IP).
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/1809795/+subscriptions
More information about the foundations-bugs
mailing list