OSDN Git Service
Lorenzo Colitti [Tue, 3 Mar 2015 08:14:02 +0000 (08:14 +0000)]
Merge "Add Python wrappers for bind and connect as well as sendmsg."
Lorenzo Colitti [Tue, 3 Mar 2015 06:28:15 +0000 (15:28 +0900)]
Add Python wrappers for bind and connect as well as sendmsg.
Change-Id: Ie75ec2d56a58a74e1680eb01993797a48cec7c70
Sami Tolvanen [Fri, 27 Feb 2015 22:23:24 +0000 (22:23 +0000)]
Merge "Add a program to display a slideshow at early boot"
Sami Tolvanen [Thu, 19 Feb 2015 10:44:12 +0000 (10:44 +0000)]
Add a program to display a slideshow at early boot
Add a small program to display a slideshow of images (specified
on the command line) on the framebuffer device. Images are switched
after a timeout, or user input. The timeout can be optionally set
using the -t command line parameter and defaults to 5s.
If user input occurred, the program will wait for the power button
to be pressed after the last image before exiting. To avoid draining
the battery after an accidental reboot, the program exists after 30s
even if the power button is not pressed.
Change-Id: I58c79a7f3ac747eec0d73a10f018d3d8ade9df7d
(Moved from I743c68b5f38038abcaaf5ae08233fa72fd823c8e)
Elliott Hughes [Fri, 20 Feb 2015 06:59:49 +0000 (06:59 +0000)]
Merge "Add missing include."
Elliott Hughes [Fri, 20 Feb 2015 06:22:48 +0000 (22:22 -0800)]
Add missing include.
...and remove an unused one.
Change-Id: I7949964b6d74f861ad07ed56f5092014fdfc7c8a
Lorenzo Colitti [Wed, 11 Feb 2015 05:36:17 +0000 (05:36 +0000)]
Merge "Download the rootfs instead of expecting it to be in the tree."
Lorenzo Colitti [Tue, 3 Feb 2015 07:20:57 +0000 (16:20 +0900)]
Download the rootfs instead of expecting it to be in the tree.
Change-Id: I17ee3a8389a141218ce8ce99a71e41b9832e8533
Erik Kline [Wed, 4 Feb 2015 10:41:14 +0000 (10:41 +0000)]
Merge "A simple script to run all tests."
Erik Kline [Wed, 4 Feb 2015 08:33:41 +0000 (17:33 +0900)]
A simple script to run all tests.
Now just type:
$CHECKOUT/system/extras/tests/net_test/run_net_test.sh all_tests.sh
and everything runs, output test output between banner lines like:
##### Found 4 tests.
##### ./multinetwork_test.py (1/4)
##### ./net_test.py (2/4)
##### ./ping6_test.py (3/4)
##### ./srcaddr_selection_test.py (4/4)
##### 0 failed tests.
The exit code is the number of failed tests.
Change-Id: Ia00c2750c4538c8af5acbd9ec660a564a430677e
Lorenzo Colitti [Wed, 4 Feb 2015 08:15:40 +0000 (08:15 +0000)]
Merge "Improvements to iproute."
Lorenzo Colitti [Wed, 4 Feb 2015 08:15:32 +0000 (08:15 +0000)]
Merge "Improve the dump code."
Lorenzo Colitti [Wed, 28 Jan 2015 08:41:19 +0000 (17:41 +0900)]
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
Lorenzo Colitti [Wed, 4 Feb 2015 04:54:05 +0000 (13:54 +0900)]
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
Lorenzo Colitti [Thu, 8 Jan 2015 08:06:56 +0000 (17:06 +0900)]
Unbreak srcaddr_selection_test.
Change-Id: Ia8ed30e6ee9cf0e2b2cceb7587ed87cb681bd3ad
Lorenzo Colitti [Fri, 19 Dec 2014 12:18:22 +0000 (21:18 +0900)]
Stop requiring a live Internet connection in ping6_test.py.
Instead, use tun interfaces like multinetwork_test does, and
a separate thread to reply to ping packets. This allows the
test cases to be almost completely unchanged.
Change-Id: Ie7e07ebdf493a3a1eb3b7774130b71205423944e
Lorenzo Colitti [Fri, 19 Dec 2014 10:25:05 +0000 (19:25 +0900)]
Disable the ping6 flowlabel test, since it doesn't work.
This has never worked on any released kernel. I committed it when
I had local changes that made it work, but those changes were not
accepted upstream.
Change-Id: Ie6e356414551744c1c4ed7c1572fe0228a5db8db
Lorenzo Colitti [Fri, 19 Dec 2014 03:23:19 +0000 (12:23 +0900)]
Support setting and clearing the default network.
Change-Id: I97531e429362b896bb72b80ba31bbc27bf345b75
Lorenzo Colitti [Wed, 17 Dec 2014 06:14:56 +0000 (15:14 +0900)]
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
Lorenzo Colitti [Wed, 17 Dec 2014 04:43:53 +0000 (13:43 +0900)]
Move all setup code to a new multinetwork_base.py
Change-Id: I4874829bb10bdd1a84ec6485a8f36e5441fc510f
Lorenzo Colitti [Wed, 17 Dec 2014 04:46:31 +0000 (13:46 +0900)]
Remove the EXPERIMENTAL from UID routing.
Change-Id: I12e6f072f9c7c096c5212becc77e83b4407ab0d0
Erik Kline [Wed, 17 Dec 2014 05:10:51 +0000 (14:10 +0900)]
Verify no NSes from optimistic addresses
- also, fixup tests to skip at more appropriate times.
Change-Id: Ib7df5a176a30a9e31e403883d52cd0d41b4475ae
Lorenzo Colitti [Wed, 17 Dec 2014 04:26:58 +0000 (13:26 +0900)]
Add a test for cross-protocol ping crash.
Change-Id: Idfea9137d77675c15c8f11f4e9603ca79c49f997
Lorenzo Colitti [Wed, 17 Dec 2014 01:33:20 +0000 (10:33 +0900)]
Skip ping tests instead of failing if the VM has no connectivity.
Change-Id: I8cf39e2409fd9521e89e73c5080b79159718965e
Lorenzo Colitti [Wed, 17 Dec 2014 04:23:43 +0000 (13:23 +0900)]
Don't infinite loop if read() on tun returns 0
Change-Id: I146ca638a250ab1d20655b995f6fa9bf637187a6
Erik Kline [Wed, 8 Oct 2014 02:17:00 +0000 (11:17 +0900)]
Further testing for optimistic address scenarios.
- Add DAD failure test.
- Separate testing address for "usability" from being "selected"
(or "preferred") by source address selection.
Change-Id: I8c11fb0dc539bc04e05274f513e07fe5531964ab
Lorenzo Colitti [Mon, 15 Dec 2014 08:23:42 +0000 (17:23 +0900)]
Fix lint warnings.
Change-Id: Icd3053963fd2e69cddb35ac7cb24bc428d536d43
Lorenzo Colitti [Mon, 15 Dec 2014 05:57:36 +0000 (14:57 +0900)]
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
Lorenzo Colitti [Mon, 15 Dec 2014 06:04:04 +0000 (15:04 +0900)]
Don't specify lladdr when deleting a neighbour.
Change-Id: I8001527095da47dafc66569bd0d4f4f742b48a33
Lorenzo Colitti [Mon, 15 Dec 2014 05:55:20 +0000 (14:55 +0900)]
Add debugging capabilities to iproute.
Change-Id: If098aafc7feee6db49de29594565f166b2100cfd
Erik Kline [Wed, 8 Oct 2014 02:17:00 +0000 (11:17 +0900)]
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
Erik Kline [Tue, 14 Oct 2014 06:52:37 +0000 (15:52 +0900)]
net_test environment changes
- update run_net_test.sh to config-enable privacy addresses
and optimistic DAD (both apparently off by default)
- update mark_test's SendRA to support passing in the ND
retranstimer parameter
Change-Id: I348609bcef16e0cb7b1f9cbfd33ef2ab4dcda917
Erik Kline [Mon, 6 Oct 2014 11:25:36 +0000 (20:25 +0900)]
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
Lorenzo Colitti [Wed, 16 Jul 2014 15:50:37 +0000 (00:50 +0900)]
Make net_test work on 3.1 kernels.
Change-Id: Ic8d2ae94a2f359ea2d3166d057f769c0692e944b
Lorenzo Colitti [Fri, 20 Jun 2014 15:55:05 +0000 (00:55 +0900)]
Don't skip the LeftoverRoutes test.
Instead, make it just document the issue.
Change-Id: I03284bb238acee3217a3b2117c262423c0383b67
Lorenzo Colitti [Fri, 20 Jun 2014 15:41:26 +0000 (00:41 +0900)]
When changing UID, become a member of AID_INET.
Otherwise we can't open any sockets, which is not very useful.
Change-Id: I4a7def277f1d14232cfc4486011935e608571fd6
Lorenzo Colitti [Mon, 19 May 2014 21:31:50 +0000 (14:31 -0700)]
Use the right version in the rule deletion test.
Change-Id: I54e53cf7751f1fce464c72d5a0468bba553f2cfa
Lorenzo Colitti [Thu, 15 May 2014 22:34:34 +0000 (15:34 -0700)]
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
Lorenzo Colitti [Thu, 15 May 2014 22:42:08 +0000 (15:42 -0700)]
Also check the MTU via netlink.
Change-Id: Ic12ab3046d1eeb5053c6d2e2693be818f6252c83
Lorenzo Colitti [Thu, 15 May 2014 18:59:15 +0000 (11:59 -0700)]
Support decoding route attributes, cacheinfo, uid.
Change-Id: Id7e84ba961a2dbb903e92cdd000017caee54299d
Lorenzo Colitti [Mon, 19 May 2014 17:59:28 +0000 (10:59 -0700)]
Fix lint error.
Change-Id: Ic627eec47b36cfb905bb89dcfaf770ecb7f99ea4
Lorenzo Colitti [Mon, 19 May 2014 06:24:03 +0000 (23:24 -0700)]
Check that route deletion does not ignore the table.
Change-Id: Id4904610d3223d87bfe46edb4b750688ec23e358
Lorenzo Colitti [Thu, 15 May 2014 01:11:45 +0000 (18:11 -0700)]
Don't check IPv6 echo reply tclass on pre-3.14 kernels
Change-Id: I6044ecd50d608d5d144c50a3e6182150a857fbad
Lorenzo Colitti [Sun, 11 May 2014 11:32:20 +0000 (20:32 +0900)]
Better tests for Path MTU discovery.
Add PMTU tests for unconnected sockets, and test PMTUD when
routing using all methods, not just using socket marking.
Change-Id: I8f0f6fc00afa95b8e57792c51e955e2150ef29dc
Lorenzo Colitti [Sun, 11 May 2014 11:31:30 +0000 (20:31 +0900)]
Move sending via pktinfo to a SendOnNetid function.
Change-Id: Ib97730123450384a5fe291c55f77e4b1e82983b7
Lorenzo Colitti [Sun, 11 May 2014 11:29:42 +0000 (20:29 +0900)]
Make olddefconfig optional; it only appeared recently.
Change-Id: Ib08c1f37712e0f83f58ab247262355d937f4efd3
Lorenzo Colitti [Sun, 11 May 2014 10:44:03 +0000 (19:44 +0900)]
If there's a new root fs, delete the old one
Otherwise xz will refuse to overwrite it. Explicitly delete it
instead of passing -f to xz because that also forces a lot of
other things, not just file overwrite.
Change-Id: Iec3c73c9ae4775039eb9c3afed91bfaa4ebedb5d
Lorenzo Colitti [Fri, 9 May 2014 18:17:09 +0000 (03:17 +0900)]
Make iproute.py work on 3.4 kernels too.
- Unrecognized attributes cause EINVAL.
- Interface names have to be null-terminated.
Change-Id: I6d032f534754465e01042a0c7bbb27ee4fbc2fa3
Lorenzo Colitti [Fri, 9 May 2014 01:22:36 +0000 (10:22 +0900)]
Add a function to build UDP packets with options.
Change-Id: I416bb293cca532b05c93bcaead9b024dbfd8c2d0
Lorenzo Colitti [Fri, 2 May 2014 10:29:49 +0000 (19:29 +0900)]
Add tests for {sticky,non-sticky} pktinfo routing
Change-Id: I7ba69ef9e26999e920118b2f3c75e34fac032d8f
Lorenzo Colitti [Wed, 7 May 2014 02:30:17 +0000 (11:30 +0900)]
Add a wrapper for sendmsg.
Change-Id: Ie1e376fdf9c067415bc682139ef7862e4b6dcf23
Lorenzo Colitti [Wed, 7 May 2014 02:29:36 +0000 (11:29 +0900)]
Support returning a C pointer to struct data.
Change-Id: Ib18b112a2e6398b54fb0504bbbbe0a3732704cac
Lorenzo Colitti [Thu, 1 May 2014 09:57:07 +0000 (18:57 +0900)]
Refactor outgoing routing into its own test.
Change-Id: I74dbc0cc2c33b4a6163acc8a764599bab769ffe9
Lorenzo Colitti [Thu, 1 May 2014 09:43:52 +0000 (18:43 +0900)]
Only run iptables when necessary.
Only run iptables for tests where we test inbound packet marking
(i.e., mark reflect and TCP mark accept). This makes running all
the tests ~6 seconds faster, and makes it free to add new test
cases if they don't use inbound marking.
Change-Id: Iaed82ce37e1edbaac6fa58fbea30fc84186d899b
Lorenzo Colitti [Thu, 1 May 2014 08:08:29 +0000 (17:08 +0900)]
Better test incoming connections.
0. Factor the TCP accept tests into their own test class.
1. Test all routing modes. Previously, the code was only testing
incoming connections with SO_BINDTODEVICE and mark accepting.
Test with UID and explicit marking as well.
2. Also check that when data is sent on the connection, it goes
out on the right interface.
3. In between calls, attempt to clear the socket destination
cache by changing IPv4 ToS and adding / deleting IPv6 options.
Change-Id: I15a28aa1f657f9c876e622e8a1a07185976828e3
Lorenzo Colitti [Thu, 1 May 2014 08:02:59 +0000 (17:02 +0900)]
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
Lorenzo Colitti [Thu, 1 May 2014 07:59:52 +0000 (16:59 +0900)]
Make it easier to test IPv4 ping on IPv6 sockets.
Change-Id: I39c3b403553a42ec0ea2cfdb6924ce6b315c6dd4
Lorenzo Colitti [Thu, 24 Apr 2014 08:56:55 +0000 (17:56 +0900)]
Separate the reflect and accept tests.
This will allow testing accepting connections in various routing
modes (uid, SO_BINDTODEVICE, mark, etc.). Currently we only test
mark and SO_BINDTODEVICE.
Change-Id: Ic93ae839e56ae70ecf2c878661ab4f60a8a2440e
Lorenzo Colitti [Thu, 24 Apr 2014 01:27:38 +0000 (10:27 +0900)]
Test raw sockets as well, using GRE packets.
Change-Id: Ifaa8adee811d952570cb8d8ae6ce2f6fad6dad00
Lorenzo Colitti [Wed, 23 Apr 2014 12:50:26 +0000 (21:50 +0900)]
Use a DNS query instead of "hello" as UDP payload
Change-Id: I4fa323f72736749ddab0d369a19c4774f8dbdd39
Lorenzo Colitti [Wed, 23 Apr 2014 08:46:32 +0000 (17:46 +0900)]
Apparently setting don't fragment is unnecessary.
Change-Id: Ib97704d8533e188f518e66805b4994769b850109
Lorenzo Colitti [Wed, 23 Apr 2014 08:36:05 +0000 (17:36 +0900)]
Simplify putting sockets onto networks.
Change-Id: Ibc82cdf3c8dd80f8bcab84b5a76f1e4d36069c89
Lorenzo Colitti [Wed, 23 Apr 2014 03:14:49 +0000 (12:14 +0900)]
Test IPv4 PMTU as well.
Change-Id: I98d7b1a4003886a08c98167da96c8851e0900f0c
Lorenzo Colitti [Tue, 22 Apr 2014 08:44:22 +0000 (17:44 +0900)]
Improve iproute attribute decoding documentation.
This reverts commit
a54a9b1046a738d645c2aa1add5c26a348a517b8.
Change-Id: I9d6566b4ed1f3723523745692bac0ed61e2775aa
Lorenzo Colitti [Tue, 22 Apr 2014 08:43:21 +0000 (17:43 +0900)]
Add outgoing packet tests using IP{,V6}_UNICAST_IF
Change-Id: I4973626e05a838704a10959a21837e22a2d41bab
Lorenzo Colitti [Tue, 22 Apr 2014 08:30:48 +0000 (17:30 +0900)]
Add more checks to the ping code.
Change-Id: Idcf6f54f102dbc7589033b9ce961dcb65e385b88
Lorenzo Colitti [Mon, 21 Apr 2014 05:13:06 +0000 (14:13 +0900)]
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
Lorenzo Colitti [Mon, 21 Apr 2014 05:13:06 +0000 (14:13 +0900)]
Add a test for UID routing configuration.
Change-Id: I79914799c653ccd5326368652a93d441f0565a3c
Lorenzo Colitti [Mon, 21 Apr 2014 05:12:28 +0000 (14:12 +0900)]
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
Lorenzo Colitti [Mon, 21 Apr 2014 05:11:22 +0000 (14:11 +0900)]
Clear CROSS_COMPILE when running tests.
Change-Id: Ife7ea26b8695a7eb74485d24beb214a92abc33dd
Lorenzo Colitti [Fri, 18 Apr 2014 07:43:35 +0000 (16:43 +0900)]
Fix flowlabel test, now it's working in the kernel
Change-Id: Iad67073f303b611bba5d19b8d0ead768450118e7
Lorenzo Colitti [Thu, 17 Apr 2014 07:33:17 +0000 (16:33 +0900)]
Replace shelling out to ip with netlink code.
This reduces test setup time by about 50%.
Change-Id: I079bd29e5366eb7b23e63b2f4f3dbd9267376cca
Lorenzo Colitti [Thu, 17 Apr 2014 06:30:31 +0000 (15:30 +0900)]
Check that remarking a socket works as expected.
Change-Id: I3d554508b35fbe2084cd6c8c40e31734dd5294d5
Lorenzo Colitti [Thu, 17 Apr 2014 06:29:40 +0000 (15:29 +0900)]
Change from UID routing to UID range routing.
Change-Id: Iafa5857827841a5dca2442e46ebd6a77ec3780a1
Lorenzo Colitti [Tue, 15 Apr 2014 11:03:12 +0000 (20:03 +0900)]
Test that local IPv6 connectivity goes direct.
Change-Id: Ia7f78b040358d787a1cdd183c0517927b14c4054
Lorenzo Colitti [Mon, 14 Apr 2014 06:13:28 +0000 (15:13 +0900)]
Test outgoing oif routing.
Change-Id: If2d6e5b9e87d4329d4c9d1cbfe5142260bc4a08b
Lorenzo Colitti [Mon, 14 Apr 2014 06:07:05 +0000 (15:07 +0900)]
Really disable DAD, and get rid of the sleeps.
Change-Id: I9209549e265921f18f68fd10b305b51e192e90f2
Lorenzo Colitti [Thu, 10 Apr 2014 11:43:15 +0000 (20:43 +0900)]
Deflakify the PMTU test.
For reasons I don't understand, sending traffic and receiving a
Packet Too Big error just after the network is set up sometimes
doesn't work - the packet doesn't even make it to icmpv6_rcv.
Add a sleep statement to fix this for now.
Change-Id: If1751e005a89f44c4d1784ef46bef97031c90a64
Lorenzo Colitti [Thu, 10 Apr 2014 10:26:08 +0000 (19:26 +0900)]
Change the error messages.
Change-Id: Iad59231db7b3ed5e3fb8b757569cc203cec3c7dd
Lorenzo Colitti [Tue, 8 Apr 2014 09:05:01 +0000 (18:05 +0900)]
Test the oif rules using SO_BINDTODEVICE.
For now, this only tests incoming connections.
Change-Id: Ie1fcf53786d6c65c7f4ec80eb6573e824e730899
Lorenzo Colitti [Tue, 8 Apr 2014 09:05:01 +0000 (18:05 +0900)]
Add more tests.
1. Check that toggling forwarding deletes autoconf routes in
all tables.
2. Add a test for Path MTU discovery (IPv6 only for now).
3. Add a test that checks that there are no leftover routes on
routing table switch. Currently disabled, because there's no
way to delete routing tables in Linux.
Change-Id: Ie21a2d2c14304d9c0fb7cd688b90cb8715e0bd68
Lorenzo Colitti [Thu, 10 Apr 2014 07:17:49 +0000 (16:17 +0900)]
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
Lorenzo Colitti [Tue, 8 Apr 2014 08:40:30 +0000 (17:40 +0900)]
Support adding outgoing interface rules.
Also add the ability for verbose debugging.
Change-Id: I7bc4b03bfdb30e554c2a6c9594845f2da6594e0f
Lorenzo Colitti [Tue, 8 Apr 2014 06:45:08 +0000 (15:45 +0900)]
Refactor setup and common code into a superclass.
Change-Id: Iee489954175de6eec12b711d6c3ebb9a64cfd6c3
Lorenzo Colitti [Fri, 4 Apr 2014 11:22:24 +0000 (20:22 +0900)]
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
Lorenzo Colitti [Fri, 4 Apr 2014 11:18:37 +0000 (20:18 +0900)]
Add support for reading routing rules.
Change-Id: I24e04f691cb5688d87da0b880ce6000fcc22c781
Lorenzo Colitti [Fri, 4 Apr 2014 11:18:08 +0000 (20:18 +0900)]
Add a module for dealing with C-style structs.
Change-Id: I3faec98ba24aefe9c7eb211ac2c5f95f9f11e027
Lorenzo Colitti [Tue, 1 Apr 2014 08:20:47 +0000 (17:20 +0900)]
Support setting the priority of rules.
Change-Id: I625443a3a7491d16f07e5b7d03e87195adbe457f
Lorenzo Colitti [Tue, 1 Apr 2014 06:08:35 +0000 (15:08 +0900)]
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
Lorenzo Colitti [Mon, 31 Mar 2014 05:33:59 +0000 (14:33 +0900)]
Fix lint warnings.
Change-Id: I1eb3d3b5e182c77e77f33860fe48003ed4cb85cd
Lorenzo Colitti [Mon, 31 Mar 2014 04:25:48 +0000 (13:25 +0900)]
Improve MarkTest.
1. Add TCP SYN+ACK tests including syncookies and checks that
accepting connections succeeids and that the sockets returned
by accept() are marked.
2. Mark the tests more robust with respect to extra packets by
always explicitly expecting packets (including when testing
outgoing kernel-generated packets) and looking for them
anywhere in the queue instead of insisting they're the first
packet in the queue.
3. Make the tests more robust by using random source port,
disabling ICMP rate limits, setting SO_REUSEADDR, and
clearing queues more reliably.
4. Move from 2 to 4 interfaces (mostly made possible by the
robustness improvements above).
5. Use named constants instead of repeating the numbers in
multiple places.
Change-Id: I596e557a7eea02ccf603c812a9b8ea6f5b2f95da
Lorenzo Colitti [Fri, 28 Mar 2014 04:18:28 +0000 (13:18 +0900)]
Test mark-based routing for outgoing packets.
Change-Id: Ifd696803f22a29bae162ab1d21d7b3552b9b80d3
Lorenzo Colitti [Fri, 28 Mar 2014 04:16:12 +0000 (13:16 +0900)]
Don't export ARCH and SUBARCH, set them explicitly
Change-Id: I1f3637202e78ba1c9448769251e641ba0af17624
Lorenzo Colitti [Fri, 28 Mar 2014 01:18:43 +0000 (10:18 +0900)]
Add a README file.
Change-Id: Iaf13f68c96f3ebbd611dc668689d468d5b0261fd
Lorenzo Colitti [Thu, 27 Mar 2014 11:10:14 +0000 (20:10 +0900)]
Kernel networking test scripts using UML.
Change-Id: I28a9901e01a53e3dde551b6c8abf6391fe4354a4
Elliott Hughes [Fri, 30 Jan 2015 06:25:28 +0000 (06:25 +0000)]
Merge "Add missing includes."
Elliott Hughes [Fri, 30 Jan 2015 05:26:35 +0000 (21:26 -0800)]
Add missing includes.
Change-Id: Ie3acca064c1bcecb4e0305e61f01ba8cea4abe03
Elliott Hughes [Thu, 29 Jan 2015 06:30:28 +0000 (06:30 +0000)]
Merge "Add missing <string.h> include."
Elliott Hughes [Thu, 29 Jan 2015 06:28:13 +0000 (22:28 -0800)]
Add missing <string.h> include.
Change-Id: I7262823b75bbcce47697fe246f6c8e902a931c8c
Elliott Hughes [Wed, 28 Jan 2015 19:19:36 +0000 (19:19 +0000)]
Merge "Add missing <string.h> include."