Send UDP packets with size > MTU to force packet fragmentation 33/131633/1
authorPiotr Sawicki <p.sawicki2@partner.samsung.com>
Tue, 30 May 2017 08:03:44 +0000 (10:03 +0200)
committerPiotr Sawicki <p.sawicki2@partner.samsung.com>
Tue, 30 May 2017 08:03:44 +0000 (10:03 +0200)
It is necessary to test whether Nether and iptables rules are able to
deal with packet fragmentation.

Change-Id: I901e63f2fe52c905b5b11b819d04c1f033a0f074

src/nether-tests/nether_tests.cpp
src/nether-tests/setup-nether-tests-nns.sh

index b9e20da..b4a3195 100644 (file)
@@ -60,7 +60,7 @@ const std::string NETHER_DNS_SETUP_COMMAND = "/usr/bin/setup-nether-tests-dns.sh
 const std::string NETHER_DNS_TEARDOWN_COMMAND = "/usr/bin/teardown-nether-tests-dns.sh";
 
 
-const ssize_t NET_BUFFER_SIZE = 1024;
+const ssize_t NET_BUFFER_SIZE = 2048;
 const int UDP_MESSAGES_COUNT = 20000;
 const int TCP_MESSAGES_COUNT = 20000;
 
index 32273cb..6ddf174 100644 (file)
@@ -29,6 +29,8 @@ ip netns exec $1 ifconfig lo 127.0.0.1
 ip netns exec $1 ifconfig veth1 10.1.0.2 netmask 255.255.255.252
 ip netns exec $1 route add -net 224.0.0.0 netmask 224.0.0.0 veth1
 
+# force mtu size (we want to test that Nether's rules can deal with fragmentation)
+ifconfig veth0 mtu 1500
 ifconfig veth0 10.1.0.1 netmask 255.255.255.252
 route add -net 224.0.0.0 netmask 240.0.0.0 veth0