summaryrefslogtreecommitdiff
path: root/tests/net_test/sock_diag.py
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2016-01-22 18:44:10 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-01-22 18:44:10 +0000
commit0d77c5522ff18e70585347d2fab7719b95d8a9af (patch)
tree70c0b6219e870746ffbda7632f174e5a871f7365 /tests/net_test/sock_diag.py
parent322453f269ac0b736f20e4619b900be155a65d2e (diff)
parentb5dfec665a8bb3d995c4e3285649b2f6a236441d (diff)
downloadextras-0d77c5522ff18e70585347d2fab7719b95d8a9af.tar.gz
Merge changes I2e3eb0b3,I2f7bd13e am: cb698c387c
am: b5dfec665a * commit 'b5dfec665a8bb3d995c4e3285649b2f6a236441d': Delete FixupDiagMsg and cite the commit that makes it unnecessary. Add a test for a port comparison bytecode validation bug.
Diffstat (limited to 'tests/net_test/sock_diag.py')
-rwxr-xr-xtests/net_test/sock_diag.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/tests/net_test/sock_diag.py b/tests/net_test/sock_diag.py
index 58a1781a..6979877f 100755
--- a/tests/net_test/sock_diag.py
+++ b/tests/net_test/sock_diag.py
@@ -286,15 +286,6 @@ class SockDiag(netlink.NetlinkSocket):
padded += "\x00" * (16 - len(padded))
return padded
- # For IPv4 addresses, the kernel seems only to fill in the first 4 bytes of
- # src and dst, leaving the others unspecified. This seems like a bug because
- # it might leak kernel memory contents, but regardless, work around it.
- @staticmethod
- def FixupDiagMsg(d):
- if d.family == AF_INET:
- d.id.src = d.id.src[:4] + "\x00" * 12
- d.id.dst = d.id.dst[:4] + "\x00" * 12
-
@staticmethod
def DiagReqFromSocket(s):
"""Creates an InetDiagReqV2 that matches the specified socket."""