Commit Graph

486 Commits

Author SHA1 Message Date
ozaki-r
960a3e1e52 Add tests of rtcache invalidation 2017-09-20 09:36:20 +00:00
christos
64e9b5d330 add tests for 4->6 connections. 2017-08-28 10:19:57 +00:00
christos
dc977faaf4 add v6 tests 2017-08-28 09:30:29 +00:00
ryo
1581658c21 Add support IP_PKTINFO for sendmsg(2).
The source address or output interface can be specified by adding IP_PKTINFO
to the control part of the message on a SOCK_DGRAM or SOCK_RAW socket.

Reviewed by ozaki-r@ and christos@. thanks.
2017-08-10 04:31:58 +00:00
knakahara
5e20be26d9 Add counter check to vlan(4) ATF. Implemented by s-yamaguchi@IIJ, thanks. 2017-08-09 06:19:56 +00:00
ozaki-r
708290e277 Fix setkey -D -P outputs
The outputs were tweaked (by me), but I forgot updating libipsec
in my local ATF environment...
2017-08-08 02:27:03 +00:00
ozaki-r
3f30ca4e9f Clean up clunky eval strings
- Remove unnecessary \ at EOL
  - This allows to omit ; too
- Remove unnecessary quotes for arguments of atf_set
- Don't expand $DEBUG in eval
  - We expect it's expanded on execution

Suggested by kre@
2017-08-03 03:16:26 +00:00
ozaki-r
5084329750 Add test cases that there are SPs but no relevant SAs 2017-08-02 06:30:00 +00:00
ozaki-r
548d2e187c Add test cases for setsockopt(IP_IPSEC_POLICY) 2017-08-02 02:19:56 +00:00
ozaki-r
b0de75e145 Skip ipsec_spi_*_*_preferred_new_timeout when running on qemu
Probably due to PR 43997
2017-07-24 02:07:43 +00:00
ozaki-r
6ff108ffbe Stop setting isr->sav on looking up sav in key_checkrequest 2017-07-21 04:43:42 +00:00
ozaki-r
a9fb96bdfe Don't make SAs expired on tests that delete SAs explicitly 2017-07-20 01:10:57 +00:00
ozaki-r
38d6ad3a8b Add tests that explicitly delete SAs instead of waiting for expirations 2017-07-19 02:06:47 +00:00
ozaki-r
80503e641a Make tests more stable
sleep command seems to wait longer than expected on anita so
use polling to wait for a state change.
2017-07-19 02:06:11 +00:00
ozaki-r
6ed91e62d5 Separate test files 2017-07-18 02:16:07 +00:00
ozaki-r
8534aec06b Fix wrong argument handling 2017-07-15 07:26:02 +00:00
ozaki-r
dfda6b6abe Add test cases for SAs with different SPIs 2017-07-14 11:54:52 +00:00
ozaki-r
9f04f77dde Add test cases for updating SA/SP
The tests require newly-added udpate command of setkey.
2017-07-05 01:25:03 +00:00
ozaki-r
b95a267001 Add test cases for IPComp 2017-07-03 06:01:16 +00:00
ozaki-r
3cd9889005 Check if ARP/NDP entries are purged when a related route is deleted 2017-06-30 07:57:12 +00:00
ozaki-r
3f42983046 Enable to remove multiple ARP/NDP entries for one destination
The kernel can have multiple ARP/NDP entries which have an indentical
destination on different interfaces. This is normal and can be
reproduce easily by ping -I or ping6 -S. We should be able to remove
such entries.

arp -d <ip> and ndp -d <ip> are changed to fetch all ARP/NDP entries
and remove matched entries. So we can remove multiple entries
described above. This fetch all and selective removal behavior is
the same as arp <ip> and ndp <ip>; they also do fetch all entries
and show only matched entries.

Related to PR 51179
2017-06-28 08:17:50 +00:00
ozaki-r
da803ed70d Restore ARP/NDP entries to route show and netstat -r
Requested by dyoung@ some time ago
2017-06-28 04:14:53 +00:00
ozaki-r
fcbd6bf4fa Drop RTF_LLINFO flag (now it's RTF_LLDATA) from local routes
They don't have llinfo anymore. And also the change fixes unexpected
behavior of ARP proxy.
2017-06-28 04:10:47 +00:00
ozaki-r
d15c5ed0e5 Fix wrong comment 2017-06-27 04:56:13 +00:00
ozaki-r
7eee4dba21 Check existence of ARP/NDP entries
Checking ARP/NDP entries is valid rather than checking routes.
2017-06-27 04:52:45 +00:00
ozaki-r
59bb97369e Drop RTF_UP from a routing message of a deleted ARP/NDP entry 2017-06-26 06:59:56 +00:00
ozaki-r
057fd82362 Improve backward compatibility of (fake) routing messages on adding an ARP/NDP entry
A message originally included only DST and GATEWAY. Restore it.
2017-06-26 03:16:28 +00:00
ozaki-r
60f1157fbd Fix usage of routing messages on arp -d and ndp -d
It didn't work as we expected; we should set RTA_GATEWAY not
RTA_IFP on RTM_GET to return an if_index and the kernel should
use it on RTM_DELETE.
2017-06-26 03:13:40 +00:00
ozaki-r
f86487ba70 Test implicit removals of ARP/NDP entries
One test case reproudces PR 51179.
2017-06-22 10:06:33 +00:00
ozaki-r
3659ef5665 Purge all related L2 caches on removing a route
The change addresses situations similar to PR 51179.
2017-06-22 09:56:48 +00:00
ozaki-r
68c930f9c3 Fix typo 2017-06-22 09:05:02 +00:00
ozaki-r
dc9233b94b Don't create a permanent L2 cache entry on adding an address to an interface
It was created to copy FreeBSD, however actually the cache isn't
necessary. Remove it to simplify the code and reduce the cost to
maintain it (e.g., keep a consistency with a corresponding local
route).
2017-06-21 09:05:31 +00:00
ozaki-r
04ce7456cf Set net.inet.arp.keep only if it's required 2017-06-21 03:10:42 +00:00
ozaki-r
72ce3b3ae5 Add missing declarations for cleanup 2017-06-19 10:57:37 +00:00
ozaki-r
6bf9d9c9db Add test cases of TCP/IPsec on an IPv4-mapped IPv6 address
It reproduces the same panic reported in PR kern/52304
(but not sure that its cause is also same).
2017-06-19 10:05:04 +00:00
ozaki-r
9b188107de Do netstat -a for an appropriate protocol 2017-06-19 09:20:29 +00:00
ozaki-r
e40a78484b Test routing messages emitted on operations of ARP/NDP entries 2017-06-16 04:41:02 +00:00
ozaki-r
388744f33f Enable DEBUG for babylon5 2017-06-14 02:33:37 +00:00
ozaki-r
1c8c9db525 Add test cases for vlan(4)
From s-yamaguchi@IIJ
2017-06-14 02:32:29 +00:00
bouyer
bc73b88a51 Test bind()ing to a non-existent interface. 2017-06-09 08:23:45 +00:00
ozaki-r
56383415f1 Add IPSEC_KEY_DEBUG
Enable the debugging feature of IPsec key (sysctl net.key.debug)
on rump kernels if the ATF test is run with IPSEC_KEY_DEBUG=true.
2017-06-02 01:18:51 +00:00
ozaki-r
946f090610 Test TCP communications over IPsec transport mode with ESP or AH
This tests SP caches of PCB.
2017-06-01 03:56:47 +00:00
ozaki-r
8504d69233 Remove a unused local variable 2017-06-01 03:51:47 +00:00
christos
1e8894c3ea undo previous; we don't have any archs where socklen_t != uint32_t. 2017-05-28 14:53:13 +00:00
christos
35f2dad6cc fix format. 2017-05-28 14:49:00 +00:00
kre
a5e8ad6bb0 Needs %zu fix for sizeof as well. 2017-05-28 13:55:07 +00:00
martin
bb62327044 Fix size_t format strings 2017-05-28 09:35:01 +00:00
bouyer
6e4cb2b9ab merge the bouyer-socketcan branch to HEAD.
CAN stands for Controller Area Network, a broadcast network used
in automation and automotive fields. For example, the NMEA2000 standard
developped for marine devices uses a CAN network as the link layer.

This is an implementation of the linux socketcan API:
https://www.kernel.org/doc/Documentation/networking/can.txt
you can also see can(4).

This adds a new socket family (AF_CAN) and protocol (PF_CAN),
as well as the canconfig(8) utility, used to set timing parameter of
CAN hardware. Also inclued is a driver for the CAN controller
found in the allwinner A20 SoC (I tested it with an Olimex lime2 board,
connected with PIC18-based CAN devices).

There is also the canloop(4) pseudo-device, which allows to use
the socketcan API without CAN hardware.

At this time the CANFD part of the linux socketcan API is not implemented.
Error frames are not implemented either. But I could get the cansend and
canreceive utilities from the canutils package to build and run with minimal
changes. tcpudmp(8) can also be used to record frames, which can be
decoded with etherreal.
2017-05-27 21:02:54 +00:00
ozaki-r
b8bb1e4f6c Change the default value of DEBUG of stable tests to false 2017-05-26 01:14:38 +00:00
ozaki-r
1104a9e5a4 Enable DEBUG to know what is happening on anita/sparc 2017-05-24 09:34:48 +00:00