History log of /system/extras/tests/net_test/iproute.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1796b06b308abdf6ceafbe5ab2b4ec6833a2bee4 03-Mar-2015 Lorenzo Colitti <lorenzo@google.com> Make UID rules specify "iif lo" to match real device configs.

Change-Id: Ieddb54dfdf0ea66a13f5ebd3fbeeea786e0c1505
/system/extras/tests/net_test/iproute.py
b59db890cbeef305dca3508f059dbb499b18d33b 28-Jan-2015 Lorenzo Colitti <lorenzo@google.com> Improvements to iproute.

1. Teach it about links.
2. Use decoded attribute names instead of raw attribute numbers
in debug output.
3. Add a function to decode netlink messages.

Change-Id: I3cb7581bac750e4784e7fbf5567d373ecc0cefdf
/system/extras/tests/net_test/iproute.py
6ecfaa16ea4d0785769a8fa625f162e5d4443ece 04-Feb-2015 Lorenzo Colitti <lorenzo@google.com> Improve the dump code.

1. Make it generic and not tied to RTMsg only.
2. Support dumps that are spread across multiple recv calls.

Change-Id: Ifad803d80cc5085dd2fe4e8b5fb555d9459bd5ae
/system/extras/tests/net_test/iproute.py
f5f1c43d6958ef2d4f44a5c942161c4ab59b1864 18-Dec-2014 Lorenzo Colitti <lorenzo@google.com> Support setting and clearing the default network.

Change-Id: I97531e429362b896bb72b80ba31bbc27bf345b75
/system/extras/tests/net_test/iproute.py
334a05a24a5e4c27d9318967987fb181530deaff 17-Dec-2014 Lorenzo Colitti <lorenzo@google.com> Clean up code in preparation for AOSP.

1. Include copyright headers in all files.
2. Clean up all lint messages except "bad header", which doesn't
like our copyright statement, but which I do not seem to be
able to disable.

Change-Id: I33b44eb7f942f0ce03c001e674377f193fb66def
/system/extras/tests/net_test/iproute.py
78a9a2c9e6f6c6d830ab972f25624163a39230fe 17-Dec-2014 Lorenzo Colitti <lorenzo@google.com> Remove the EXPERIMENTAL from UID routing.

Change-Id: I12e6f072f9c7c096c5212becc77e83b4407ab0d0
/system/extras/tests/net_test/iproute.py
b87c813197ab205074e3bdbad4a5e7e2eb39e9d2 15-Dec-2014 Lorenzo Colitti <lorenzo@google.com> Fix lint warnings.

Change-Id: Icd3053963fd2e69cddb35ac7cb24bc428d536d43
/system/extras/tests/net_test/iproute.py
de7c4f07a185470587e7940cb0324823b68ccf28 15-Dec-2014 Lorenzo Colitti <lorenzo@google.com> Manually add directly-connected routes as well as default routes

Currently, the manual routing configuration that we use when
running the tests on a kernel that does not have the
accept_ra_rt_table sysctl does not add directly-connected routes
to the per-interface routing tables. This does not allow us to
test on-link connectivity unless the sysctl is present.

Remove this restriction and enable testOnlinkCommunication.

Also make testLeftoverRoutes conditional on HAVE_AUTOCONF_TABLE,
because without per-interface routing tables, sending an RA does
not result in the creation of a new routing table.

Change-Id: I16177cf374040b87a78e7455b05b11b956f4e7ee
/system/extras/tests/net_test/iproute.py
f36fcbacdd0b86bdc2ba1f7059df57c3423019ba 15-Dec-2014 Lorenzo Colitti <lorenzo@google.com> Don't specify lladdr when deleting a neighbour.

Change-Id: I8001527095da47dafc66569bd0d4f4f742b48a33
/system/extras/tests/net_test/iproute.py
852c1e29f7b5965cd398e0bac1a91f9a6fcf6cfd 15-Dec-2014 Lorenzo Colitti <lorenzo@google.com> Add debugging capabilities to iproute.

Change-Id: If098aafc7feee6db49de29594565f166b2100cfd
/system/extras/tests/net_test/iproute.py
fd95dbbdec851a6ebec9c5a3dda7b682963a5585 08-Oct-2014 Erik Kline <ek@google.com> Add test for source address selection behaviour.

Depends on use_optimistic kernel work:
https://android-review.googlesource.com/#/c/109934/

- Add busy wait for DAD to complete to verify that
tentative and optimistic addresses both /eventually/
become preferable addresses for source selection.

Change-Id: I7a584129f69e6159ff9a0a7eaf54de3200321546
/system/extras/tests/net_test/iproute.py
aca272212f10365ab66891b43c535eed7ef63f72 06-Oct-2014 Erik Kline <ek@google.com> Add basic RTM_GETADDR support.

[iproute.py]
- Basic RTM_GETADDR support (currently IPv6-only).
- Add the rest of Linux's IFA_F_* flags values.

[mark_test.py]
- Fix comment typo.

Bug: 17769720
Change-Id: I4e883a6e01c825ee0de75314f12c0892e96d5a15
/system/extras/tests/net_test/iproute.py
ab798de742c067f74a58841ca8b26be2d683308e 16-May-2014 Lorenzo Colitti <lorenzo@google.com> Return route attribute types as strings.

This is not really a good solution, because attributes are
passed in as integers and returned as strings, but at least the
returned values don't need to be decoded again. Without this
change, attribute types are integers whose meaning cannot be
determined without decoding the message again.

The proper solution would be to define these as some sort of
enum type.

Change-Id: Ifd031329719db40f2230ae3d020c65427f3207f5
/system/extras/tests/net_test/iproute.py
a207bc0c270c3f6d34ad69bb10c7e935295712e3 15-May-2014 Lorenzo Colitti <lorenzo@google.com> Support decoding route attributes, cacheinfo, uid.

Change-Id: Id7e84ba961a2dbb903e92cdd000017caee54299d
/system/extras/tests/net_test/iproute.py
7ba0cb5bf39f904f61c55e0e130a3d7f55ba1c8f 19-May-2014 Lorenzo Colitti <lorenzo@google.com> Fix lint error.

Change-Id: Ic627eec47b36cfb905bb89dcfaf770ecb7f99ea4
/system/extras/tests/net_test/iproute.py
f4f1424e5a1bcd4642b7a1489a36c1cb3f03e046 19-May-2014 Lorenzo Colitti <lorenzo@google.com> Check that route deletion does not ignore the table.

Change-Id: Id4904610d3223d87bfe46edb4b750688ec23e358
/system/extras/tests/net_test/iproute.py
b23e017b5cd2d1a163259a7cfdc9270d4d982e9b 09-May-2014 Lorenzo Colitti <lorenzo@google.com> Make iproute.py work on 3.4 kernels too.

- Unrecognized attributes cause EINVAL.
- Interface names have to be null-terminated.

Change-Id: I6d032f534754465e01042a0c7bbb27ee4fbc2fa3
/system/extras/tests/net_test/iproute.py
051c29078188c01d5c451b60a003ba9ec00a2822 01-May-2014 Lorenzo Colitti <lorenzo@google.com> Make the test more robust with an unreachable rule

This ensures that even if the system has a default route, sends
will return an error unless the socket has explicitly selected
an interface.

Change-Id: I3f0ddd88a1b679fa3fb47ab7b78616fe7bf3ca9f
/system/extras/tests/net_test/iproute.py
2595a2ae2e62ca29569aeb18f7f7857659cd78b5 22-Apr-2014 Lorenzo Colitti <lorenzo@google.com> Improve iproute attribute decoding documentation.

This reverts commit a54a9b1046a738d645c2aa1add5c26a348a517b8.

Change-Id: I9d6566b4ed1f3723523745692bac0ed61e2775aa
/system/extras/tests/net_test/iproute.py
df9b9bf57c755bc6ad234baa6d5a4454be1307bd 21-Apr-2014 Lorenzo Colitti <lorenzo@google.com> Test looking up routes with UIDs from userspace.

This checks that the kernel properly parses the RTA_UID
attribute when looking up a route from userspace.

Change-Id: Ib43506f3143ca05a7d7245c54bb27a42b29fcd24
/system/extras/tests/net_test/iproute.py
7a799dc4db3d08e3308af6fc1e7a1fa1e404442c 21-Apr-2014 Lorenzo Colitti <lorenzo@google.com> Better support for rule attributes.

1. Make attributes into a dict so we can find them.
2. Add a function to decode some attributes to Python types.

Change-Id: I8d52a203818f5b24cf691cd2e86d52744d2ee191
/system/extras/tests/net_test/iproute.py
9e66bfb4888ca59a38aeb8a0952b03a022187b88 17-Apr-2014 Lorenzo Colitti <lorenzo@google.com> Replace shelling out to ip with netlink code.

This reduces test setup time by about 50%.

Change-Id: I079bd29e5366eb7b23e63b2f4f3dbd9267376cca
/system/extras/tests/net_test/iproute.py
b4088c2ad97e03c4e56f031c2df181df7d36c3b0 17-Apr-2014 Lorenzo Colitti <lorenzo@google.com> Change from UID routing to UID range routing.

Change-Id: Iafa5857827841a5dca2442e46ebd6a77ec3780a1
/system/extras/tests/net_test/iproute.py
455a2a6964ec6408d8f7cb2c629a65a34bc43f08 10-Apr-2014 Lorenzo Colitti <lorenzo@google.com> Fixes to iproute.

1. Expect NLMSG_DONE after a dump. Otherwise, the NLMSG_DONE
message will remain in the socket buffer and the next read on
the socket (e.g., the read for an ACK) will get an unexpected
message.
2. Properly pad attributes that are not multiples of 4 bytes
long. This is useful, for example, for interface names, which
are not necessarily a multiple of 4 characters long.

Change-Id: I08872ae6b287ec24231fdb4c9e54852c87daca69
/system/extras/tests/net_test/iproute.py
d6d303df685e53f93d2a9e15496d2fc083928b74 08-Apr-2014 Lorenzo Colitti <lorenzo@google.com> Support adding outgoing interface rules.

Also add the ability for verbose debugging.

Change-Id: I7bc4b03bfdb30e554c2a6c9594845f2da6594e0f
/system/extras/tests/net_test/iproute.py
cabf6eb8a9816682c90d11cd84cb59d0f2d7f4c9 04-Apr-2014 Lorenzo Colitti <lorenzo@google.com> Updates to mark_test.

1. UID routing.
- Also test per-UID routing, if supported by the kernel.

2. Sysctl changes.
- Refactor code that sets sysctls, and robustly restore them in
tearDown.
- Check for the TCP FWMARK reflect sysctl.
- Support separate sysctls for IPv4 and IPv6 mark reflection.
- Switch to using the per-interface RA sysctl, and configure
routing manually if it's not there.

3. Test coverage.
- Test TCP FIN and FIN+ACK. This not only increases coverage
but also makes the test more robust, since retransmitted FINs
won't confuse other reflection tests.
- Test behaviour with the mark sysctls off.

4. Robustness changes.
- Run the reflect and accept tests multiple times to help
expose any flaky behaviour.
- Skip multicast packets. This makes things more robust, as
previously, code that was expecting no packets would fail
because it would receive an RS instead.

5. Readability improvements.
- Move code around to make it a bit more readable.

Change-Id: Ieb5f81a1ec077d25d49b212cecbe82c527d69002
/system/extras/tests/net_test/iproute.py
15654338bcd6d12f8d360007d38d2e71056da29f 04-Apr-2014 Lorenzo Colitti <lorenzo@google.com> Add support for reading routing rules.

Change-Id: I24e04f691cb5688d87da0b880ce6000fcc22c781
/system/extras/tests/net_test/iproute.py
d2dab4516b902bdaef56a00c14e0121fd5bc18a9 01-Apr-2014 Lorenzo Colitti <lorenzo@google.com> Support setting the priority of rules.

Change-Id: I625443a3a7491d16f07e5b7d03e87195adbe457f
/system/extras/tests/net_test/iproute.py
9c53e8a60125235f0c2263a06ba9a9d2b5419f2c 01-Apr-2014 Lorenzo Colitti <lorenzo@google.com> Move ip rule functionality to Python.

This allows us to experiment with ip rules without having to
compile a modified ip binary for the VM architecture.

Change-Id: Ibb0bc510fc2b1686712b94fffae6f1cea26a82bf
/system/extras/tests/net_test/iproute.py