Commit Graph

469 Commits

Author SHA1 Message Date
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
ozaki-r 0871e3e188 Enable debug logging of kernels such as ARP and ND if $DEUBG=true 2017-05-19 02:56:58 +00:00
ozaki-r 43af182f5e Don't check the existence of SA entries eagerly
They can be expired at that point if their lifetime is very short.
This may fix unexpected failures of tests running on anita.
2017-05-18 14:43:42 +00:00
ozaki-r 28c6f0e797 Test CARP handover on setups without having IPs on carpdev (shmif)
Note that tests for IPv6 don't pass yet; nd6 needs to handle CARP
correctly like arp does.
2017-05-18 06:34:48 +00:00
ozaki-r 9c1d2498f1 Reduce duplicated codes (DRY) 2017-05-18 06:33:49 +00:00
ozaki-r beade07f61 Add test cases of TCP communications with IPsec enabled
The test cases transfer data over TCP by using nc with IPsec just enabled
(no SA/SP is configured) and confirm the commit "Fix diagnostic assertion
failure in ipsec_init_policy" really fixes the issue.
2017-05-17 06:30:15 +00:00
ozaki-r fe20eadb23 Add test cases for SA lifetime 2017-05-15 09:58:22 +00:00
ozaki-r 12efcd61a3 Fix typo 2017-05-15 09:56:47 +00:00
ozaki-r e106de3177 Dedup some routines 2017-05-12 02:34:45 +00:00
ozaki-r cb7a3799fb Test tunnel mode with IPv4 over IPv6 and IPv6 over IPv4 2017-05-10 09:08:25 +00:00
ozaki-r f70653090a Disable DAD rather than waiting its completion every time 2017-05-10 09:00:29 +00:00
ozaki-r 27f51fa5d6 Dedup some routines 2017-05-10 08:59:40 +00:00
ozaki-r 0eb085d9dc Introduce check_sa_entries to remove lots of duplicated codes 2017-05-10 04:46:13 +00:00
ozaki-r 63d8d68bc2 Test flushing SAD/SPD entries 2017-05-09 04:25:28 +00:00
ozaki-r 1926b285fc Test transport mode as well as tunnel mode 2017-04-27 10:17:12 +00:00
ozaki-r 15fbe23193 Prefer rijndael-cbc 2017-04-27 08:06:59 +00:00
ozaki-r 3c135203c7 Add test cases for L2TP/IPsec 2017-04-27 06:53:44 +00:00
ozaki-r 9b089297f0 Add test cases for gif/IPsec 2017-04-27 06:52:45 +00:00