From patchwork Mon Feb 29 06:33:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gurucharan Shetty X-Patchwork-Id: 590026 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id BCBEB140784 for ; Tue, 1 Mar 2016 03:22:42 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 02961106C2; Mon, 29 Feb 2016 08:22:39 -0800 (PST) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 754D3106B3 for ; Mon, 29 Feb 2016 08:22:37 -0800 (PST) Received: from bar5.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id DCB07420338 for ; Mon, 29 Feb 2016 09:22:36 -0700 (MST) X-ASG-Debug-ID: 1456762956-09eadd576e3c180001-byXFYA Received: from mx1-pf1.cudamail.com ([192.168.24.1]) by bar5.cudamail.com with ESMTP id DxMl7vTXSM6zcsbM (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 29 Feb 2016 09:22:36 -0700 (MST) X-Barracuda-Envelope-From: guru.ovn@gmail.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.1 Received: from unknown (HELO mail-pa0-f48.google.com) (209.85.220.48) by mx1-pf1.cudamail.com with ESMTPS (RC4-SHA encrypted); 29 Feb 2016 16:22:36 -0000 Received-SPF: pass (mx1-pf1.cudamail.com: SPF record at _netblocks.google.com designates 209.85.220.48 as permitted sender) X-Barracuda-RBL-Trusted-Forwarder: 209.85.220.48 Received: by mail-pa0-f48.google.com with SMTP id yy13so94333358pab.3 for ; Mon, 29 Feb 2016 08:22:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cewpUFC5WUwf8S4xMGerrw49NewNRVDgHcMftf1b7Y0=; b=PYmhKbFvli+trwfLvnUG6gcLY4MaIgNiqI3s/peNsCd0Vd2FuJDSLNcJTR3OiyUIfp XJVVanTN7to9w54LjbqNFV/i+oe5Pu/wHkO482857TrdvRIpv3BrnfLUWU1G2JKbo0gZ VBOhIFqNyNnt6c9RQ6rmuKUB88y/aq9ZCA54H+nrjD7WMV8tAcD9/PWbppbApV732Lfd GnZan6TgEIcaHVgKh8Y0aPAq4vz8/quYeHUdm83141laTLAP8qars+gL9fvgouIs2wCQ VVdAtE5PuSVi9Yshf63nrWPncmx2uMVqfxTrY2fBYukrYKAem9S+v6DAjIGbDNVbO9Cx Yo0Q== X-Gm-Message-State: AD7BkJI9ZjtCS1HqiyjL0BxEOeX8Wp1Pv16v0PQYGolJFm/vO6qn1p1YBdfMpYuFQjieVQ== X-Received: by 10.67.4.1 with SMTP id ca1mr22762549pad.7.1456762955637; Mon, 29 Feb 2016 08:22:35 -0800 (PST) Received: from ovn1.eng.vmware.com ([208.91.1.34]) by smtp.gmail.com with ESMTPSA id n68sm39202142pfj.46.2016.02.29.08.22.33 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 29 Feb 2016 08:22:34 -0800 (PST) X-CudaMail-Envelope-Sender: guru.ovn@gmail.com X-Barracuda-Apparent-Source-IP: 208.91.1.34 From: Gurucharan Shetty To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-E1-228035633 X-CudaMail-DTE: 022916 X-CudaMail-Originating-IP: 209.85.220.48 Date: Sun, 28 Feb 2016 22:33:17 -0800 X-ASG-Orig-Subj: [##CM-E1-228035633##][RFC 1/8] system-traffic: Load balancing. Message-Id: <1456727604-15784-2-git-send-email-guru@ovn.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1456727604-15784-1-git-send-email-guru@ovn.org> References: <1456727604-15784-1-git-send-email-guru@ovn.org> X-Barracuda-Connect: UNKNOWN[192.168.24.1] X-Barracuda-Start-Time: 1456762956 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Cc: Jarno Rajahalme Subject: [ovs-dev] [RFC 1/8] system-traffic: Load balancing. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" From: Jarno Rajahalme Signed-off-by: Jarno Rajahalme Acked-by: Ben Pfaff --- lib/ofp-actions.c | 3 +- ofproto/ofproto-dpif-xlate.c | 21 ++++ tests/system-traffic.at | 225 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 248 insertions(+), 1 deletion(-) diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c index becf02d..8f6e02e 100644 --- a/lib/ofp-actions.c +++ b/lib/ofp-actions.c @@ -5913,7 +5913,8 @@ ofpacts_execute_action_set(struct ofpbuf *action_list, * not be sent anywhere. */ if (!ofpacts_copy_last(action_list, action_set, OFPACT_GROUP) && !ofpacts_copy_last(action_list, action_set, OFPACT_OUTPUT) && - !ofpacts_copy_last(action_list, action_set, OFPACT_RESUBMIT)) { + !ofpacts_copy_last(action_list, action_set, OFPACT_RESUBMIT) && + !ofpacts_copy_last(action_list, action_set, OFPACT_CT)) { ofpbuf_clear(action_list); } } diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 57d877f..ce7d8e1 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -3293,18 +3293,37 @@ xlate_group_stats(struct xlate_ctx *ctx, struct group_dpif *group, } static void +group_report_valist(struct xlate_in *xin OVS_UNUSED, int recurse, + const char *format, va_list args) +{ + struct ds ds = DS_EMPTY_INITIALIZER; + + ds_put_char_multiple(&ds, ' ', recurse); + ds_put_format_valist(&ds, format, args); + VLOG_INFO("Group execution: %s", ds_cstr(&ds)); + ds_destroy(&ds); +} + +static void xlate_group_bucket(struct xlate_ctx *ctx, struct ofputil_bucket *bucket) { uint64_t action_list_stub[1024 / 8]; struct ofpbuf action_list, action_set; struct flow old_flow = ctx->xin->flow; bool old_was_mpls = ctx->was_mpls; + void (*old_report_hook)(struct xlate_in *, int recurse, + const char *format, va_list args) = ctx->xin->report_hook; + ctx->xin->report_hook = group_report_valist; + xlate_report_actions(ctx, "Considering bucket actions: ", + bucket->ofpacts, bucket->ofpacts_len); ofpbuf_use_const(&action_set, bucket->ofpacts, bucket->ofpacts_len); ofpbuf_use_stub(&action_list, action_list_stub, sizeof action_list_stub); ofpacts_execute_action_set(&action_list, &action_set); ctx->recurse++; + xlate_report_actions(ctx, "Executing group actions: ", + action_list.data, action_list.size); do_xlate_actions(action_list.data, action_list.size, ctx); ctx->recurse--; @@ -3342,6 +3361,8 @@ xlate_group_bucket(struct xlate_ctx *ctx, struct ofputil_bucket *bucket) * actions after the group action must continue processing with the * original, not the recirculated packet! */ ctx->exit = false; + + ctx->xin->report_hook = old_report_hook; } static void diff --git a/tests/system-traffic.at b/tests/system-traffic.at index 74ca0a0..150009a 100644 --- a/tests/system-traffic.at +++ b/tests/system-traffic.at @@ -1956,3 +1956,228 @@ tcp,orig=(src=fc00::2,dst=fc00::240,sport=,dport=),reply=(src= OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP + + +AT_SETUP([conntrack - DNAT load balancing]) +CHECK_CONNTRACK() +OVS_TRAFFIC_VSWITCHD_START() + +ADD_NAMESPACES(at_ns1, at_ns2, at_ns3, at_ns4) + +ADD_VETH(p1, at_ns1, br0, "10.1.1.1/24") +ADD_VETH(p2, at_ns2, br0, "10.1.1.2/24") +ADD_VETH(p3, at_ns3, br0, "10.1.1.3/24") +ADD_VETH(p4, at_ns4, br0, "10.1.1.4/24") +NS_CHECK_EXEC([at_ns1], [ip link set dev p1 address 80:88:88:88:88:11]) +NS_CHECK_EXEC([at_ns2], [ip link set dev p2 address 80:88:88:88:88:22]) +NS_CHECK_EXEC([at_ns3], [ip link set dev p3 address 80:88:88:88:88:33]) +NS_CHECK_EXEC([at_ns4], [ip link set dev p4 address 80:88:88:88:88:44]) + +dnl Select group for load balancing. One bucket per server. Each bucket +dnl tracks and NATs the connection and recirculates to table 4 for egress +dnl routing. Packets of existing connections are always NATted based on +dnl connection state, only new connections are NATted according to the +dnl specific NAT parameters in each bucket. +AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn add-group br0 "group_id=234,type=select,bucket=weight=100,ct(nat(dst=10.1.1.2),commit,table=4),bucket=weight=100,ct(nat(dst=10.1.1.3),commit,table=4),bucket=weight=100,ct(nat(dst=10.1.1.4),commit,table=4)"]) + +AT_DATA([flows.txt], [dnl +dnl Track connections to the virtual IP address. +table=0 priority=100 ip nw_dst=10.1.1.64 action=group:234 +dnl All other IP traffic is allowed but the connection state is no commited. +table=0 priority=90 ip action=ct(table=4,nat) +dnl +dnl Allow ARP, but generate responses for virtual addresses +table=0 priority=100 arp arp_op=1 action=move:OXM_OF_ARP_TPA[[]]->NXM_NX_REG2[[]],resubmit(,8),goto_table:10 +table=0 priority=10 arp action=normal +table=0 priority=0 action=drop +dnl +dnl Routing table +dnl +table=4,ip,nw_dst=10.1.1.1 action=mod_dl_dst:80:88:88:88:88:11,output:1 +table=4,ip,nw_dst=10.1.1.2 action=mod_dl_dst:80:88:88:88:88:22,output:2 +table=4,ip,nw_dst=10.1.1.3 action=mod_dl_dst:80:88:88:88:88:33,output:3 +table=4,ip,nw_dst=10.1.1.4 action=mod_dl_dst:80:88:88:88:88:44,output:4 +table=4 priority=0 action=drop +dnl +dnl MAC resolution table for IP in reg2, stores mac in OXM_OF_PKT_REG0 +table=8,reg2=0x0a010140,action=load:0x808888888888->OXM_OF_PKT_REG0[[]] +dnl Zero result means not found. +table=8,priority=0,action=load:0->OXM_OF_PKT_REG0[[]] +dnl ARP responder mac filled in at OXM_OF_PKT_REG0, or 0 for normal action. +dnl TPA IP in reg2. +table=10 priority=100 arp xreg0=0 action=normal +dnl Swaps the fields of the ARP message to turn a query to a response. +table=10 priority=10,arp,arp_op=1,action=load:2->OXM_OF_ARP_OP[[]],move:OXM_OF_ARP_SHA[[]]->OXM_OF_ARP_THA[[]],move:OXM_OF_PKT_REG0[[0..47]]->OXM_OF_ARP_SHA[[]],move:OXM_OF_ARP_SPA[[]]->OXM_OF_ARP_TPA[[]],move:NXM_NX_REG2[[]]->OXM_OF_ARP_SPA[[]],move:NXM_OF_ETH_SRC[[]]->NXM_OF_ETH_DST[[]],move:OXM_OF_PKT_REG0[[0..47]]->NXM_OF_ETH_SRC[[]],move:NXM_OF_IN_PORT[[]]->NXM_NX_REG3[[0..15]],load:0->NXM_OF_IN_PORT[[]],output:NXM_NX_REG3[[0..15]] +table=10 priority=0 action=controller +]) + +AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt]) + +dnl Start web servers +NETNS_DAEMONIZE([at_ns2], [[$PYTHON $srcdir/test-l7.py]], [http2.pid]) +NETNS_DAEMONIZE([at_ns3], [[$PYTHON $srcdir/test-l7.py]], [http3.pid]) +NETNS_DAEMONIZE([at_ns4], [[$PYTHON $srcdir/test-l7.py]], [http4.pid]) + +on_exit 'ovs-ofctl -O OpenFlow15 dump-flows br0' +on_exit 'ovs-appctl revalidator/purge' +on_exit 'ovs-appctl dpif/dump-flows br0' + +dnl Should work with the virtual IP address through NAT +for i in 1 2 3 4 5 6 7 8 9 10 11 12; do + echo Request $i + NS_CHECK_EXEC([at_ns1], [wget 10.1.1.64 -t 5 -T 1 --retry-connrefused -v -o wget$i.log]) +done + +dnl Each server should have at least one connection. +AT_CHECK([conntrack -L 2>&1 | FORMAT_CT(10.1.1.64) | sort], [0], [dnl +TIME_WAIT src=10.1.1.1 dst=10.1.1.64 sport= dport= src=10.1.1.2 dst=10.1.1.1 sport= dport= [[ASSURED]] mark=0 use=1 +TIME_WAIT src=10.1.1.1 dst=10.1.1.64 sport= dport= src=10.1.1.3 dst=10.1.1.1 sport= dport= [[ASSURED]] mark=0 use=1 +TIME_WAIT src=10.1.1.1 dst=10.1.1.64 sport= dport= src=10.1.1.4 dst=10.1.1.1 sport= dport= [[ASSURED]] mark=0 use=1 +]) + +ovs-appctl dpif/dump-flows br0 +ovs-appctl revalidator/purge +ovs-ofctl -O OpenFlow15 dump-flows br0 +ovs-ofctl -O OpenFlow15 dump-group-stats br0 + +OVS_TRAFFIC_VSWITCHD_STOP +AT_CLEANUP + + +AT_SETUP([conntrack - DNAT load balancing with NC]) +CHECK_CONNTRACK() +OVS_TRAFFIC_VSWITCHD_START() + +ADD_NAMESPACES(at_ns1, at_ns2, at_ns3, at_ns4, at_ns5) + +ADD_VETH(p1, at_ns1, br0, "10.1.1.1/24") +ADD_VETH(p2, at_ns2, br0, "10.1.1.2/24") +ADD_VETH(p3, at_ns3, br0, "10.1.1.3/24") +ADD_VETH(p4, at_ns4, br0, "10.1.1.4/24") +ADD_VETH(p5, at_ns5, br0, "10.1.1.5/24") +NS_CHECK_EXEC([at_ns1], [ip link set dev p1 address 80:88:88:88:88:11]) +NS_CHECK_EXEC([at_ns2], [ip link set dev p2 address 80:88:88:88:88:22]) +NS_CHECK_EXEC([at_ns3], [ip link set dev p3 address 80:88:88:88:88:33]) +NS_CHECK_EXEC([at_ns4], [ip link set dev p4 address 80:88:88:88:88:44]) +NS_CHECK_EXEC([at_ns5], [ip link set dev p5 address 80:88:88:88:88:55]) + +dnl Select group for load balancing. One bucket per server. Each bucket +dnl tracks and NATs the connection and recirculates to table 4 for egress +dnl routing. Packets of existing connections are always NATted based on +dnl connection state, only new connections are NATted according to the +dnl specific NAT parameters in each bucket. +AT_CHECK([ovs-ofctl -O OpenFlow15 -vwarn add-group br0 "group_id=234,type=select,bucket=weight=100,ct(nat(dst=10.1.1.2),commit,table=4),bucket=weight=100,ct(nat(dst=10.1.1.3),commit,table=4),bucket=weight=100,ct(nat(dst=10.1.1.4),commit,table=4)"]) + +AT_DATA([flows.txt], [dnl +dnl Track connections to the virtual IP address. +table=0 priority=100 ip nw_dst=10.1.1.64 action=group:234 +dnl All other IP traffic is allowed but the connection state is no commited. +table=0 priority=90 ip action=ct(table=4,nat) +dnl +dnl Allow ARP, but generate responses for virtual addresses +table=0 priority=100 arp arp_op=1 action=move:OXM_OF_ARP_TPA[[]]->NXM_NX_REG2[[]],resubmit(,8),goto_table:10 +table=0 priority=10 arp action=normal +table=0 priority=0 action=drop +dnl +dnl Routing table +dnl +table=4,ip,nw_dst=10.1.1.1 action=mod_dl_dst:80:88:88:88:88:11,output:1 +table=4,ip,nw_dst=10.1.1.2 action=mod_dl_dst:80:88:88:88:88:22,output:2 +table=4,ip,nw_dst=10.1.1.3 action=mod_dl_dst:80:88:88:88:88:33,output:3 +table=4,ip,nw_dst=10.1.1.4 action=mod_dl_dst:80:88:88:88:88:44,output:4 +table=4,ip,nw_dst=10.1.1.5 action=mod_dl_dst:80:88:88:88:88:55,output:5 +table=4 priority=0 action=drop +dnl +dnl MAC resolution table for IP in reg2, stores mac in OXM_OF_PKT_REG0 +table=8,reg2=0x0a010140,action=load:0x808888888888->OXM_OF_PKT_REG0[[]] +dnl Zero result means not found. +table=8,priority=0,action=load:0->OXM_OF_PKT_REG0[[]] +dnl ARP responder mac filled in at OXM_OF_PKT_REG0, or 0 for normal action. +dnl TPA IP in reg2. +table=10 priority=100 arp xreg0=0 action=normal +dnl Swaps the fields of the ARP message to turn a query to a response. +table=10 priority=10,arp,arp_op=1,action=load:2->OXM_OF_ARP_OP[[]],move:OXM_OF_ARP_SHA[[]]->OXM_OF_ARP_THA[[]],move:OXM_OF_PKT_REG0[[0..47]]->OXM_OF_ARP_SHA[[]],move:OXM_OF_ARP_SPA[[]]->OXM_OF_ARP_TPA[[]],move:NXM_NX_REG2[[]]->OXM_OF_ARP_SPA[[]],move:NXM_OF_ETH_SRC[[]]->NXM_OF_ETH_DST[[]],move:OXM_OF_PKT_REG0[[0..47]]->NXM_OF_ETH_SRC[[]],move:NXM_OF_IN_PORT[[]]->NXM_NX_REG3[[0..15]],load:0->NXM_OF_IN_PORT[[]],output:NXM_NX_REG3[[0..15]] +table=10 priority=0 action=controller +]) + +AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt]) + +dnl Start web servers +NETNS_DAEMONIZE([at_ns2], [[$PYTHON $srcdir/test-l7.py]], [http2.pid]) +NETNS_DAEMONIZE([at_ns3], [[$PYTHON $srcdir/test-l7.py]], [http3.pid]) +NETNS_DAEMONIZE([at_ns4], [[$PYTHON $srcdir/test-l7.py]], [http4.pid]) + +on_exit 'ovs-ofctl -O OpenFlow15 dump-flows br0' +on_exit 'ovs-appctl revalidator/purge' +on_exit 'ovs-appctl dpif/dump-flows br0' + +sleep 5 + +dnl Should work with the virtual IP address through NAT +for i in 1 2 3 4 5 6 7 8 9; do + echo Request $i + NS_CHECK_EXEC([at_ns1], [echo "TEST1" | nc -p 4100$i 10.1.1.64 80 > nc-1-$i.log]) + NS_CHECK_EXEC([at_ns5], [echo "TEST5" | nc -p 4100$i 10.1.1.64 80 > nc-5-$i.log]) +done + +conntrack -L 2>&1 + +ovs-appctl dpif/dump-flows br0 +ovs-appctl revalidator/purge +ovs-ofctl -O OpenFlow15 dump-flows br0 +ovs-ofctl -O OpenFlow15 dump-group-stats br0 + +OVS_TRAFFIC_VSWITCHD_STOP +AT_CLEANUP + + +AT_SETUP([conntrack - SNAT with overlapping source ports]) +CHECK_CONNTRACK() +OVS_TRAFFIC_VSWITCHD_START() + +ADD_NAMESPACES(at_ns0, at_ns1) + +ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24") +NS_CHECK_EXEC([at_ns0], [ip link set dev p0 address 80:88:88:88:88:88]) +NS_CHECK_EXEC([at_ns0], [ip addr add 10.1.1.11/24 dev p0]) +ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24") + +dnl Allow any traffic from ns0->ns1. Only allow nd, return traffic from ns1->ns0. +AT_DATA([flows.txt], [dnl +in_port=1,ip,action=ct(commit,zone=1,nat(src=10.1.1.240)),2 +in_port=2,ct_state=-trk,ip,action=ct(table=0,zone=1,nat) +in_port=2,ct_state=+trk,ct_zone=1,ip,action=1 +dnl +dnl ARP +priority=100 arp arp_op=1 action=move:OXM_OF_ARP_TPA[[]]->NXM_NX_REG2[[]],resubmit(,8),goto_table:10 +priority=10 arp action=normal +priority=0,action=drop +dnl +dnl MAC resolution table for IP in reg2, stores mac in OXM_OF_PKT_REG0 +table=8,reg2=0x0a0101f0/0xfffffff0,action=load:0x808888888888->OXM_OF_PKT_REG0[[]] +table=8,priority=0,action=load:0->OXM_OF_PKT_REG0[[]] +dnl ARP responder mac filled in at OXM_OF_PKT_REG0, or 0 for normal action. +dnl TPA IP in reg2. +dnl Swaps the fields of the ARP message to turn a query to a response. +table=10 priority=100 arp xreg0=0 action=normal +table=10 priority=10,arp,arp_op=1,action=load:2->OXM_OF_ARP_OP[[]],move:OXM_OF_ARP_SHA[[]]->OXM_OF_ARP_THA[[]],move:OXM_OF_PKT_REG0[[0..47]]->OXM_OF_ARP_SHA[[]],move:OXM_OF_ARP_SPA[[]]->OXM_OF_ARP_TPA[[]],move:NXM_NX_REG2[[]]->OXM_OF_ARP_SPA[[]],move:NXM_OF_ETH_SRC[[]]->NXM_OF_ETH_DST[[]],move:OXM_OF_PKT_REG0[[0..47]]->NXM_OF_ETH_SRC[[]],move:NXM_OF_IN_PORT[[]]->NXM_NX_REG3[[0..15]],load:0->NXM_OF_IN_PORT[[]],output:NXM_NX_REG3[[0..15]] +table=10 priority=0 action=drop +]) + +AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt]) + +dnl HTTP requests from p0->p1 should work fine. +NETNS_DAEMONIZE([at_ns1], [[$PYTHON $srcdir/test-l7.py]], [http0.pid]) + +NS_CHECK_EXEC([at_ns0], [wget --bind-address 10.1.1.11 10.1.1.2 -t 5 -T 1 --retry-connrefused -v -o wget0.log]) +NS_CHECK_EXEC([at_ns0], [echo "TEST1" | nc -p 41001 -s 10.1.1.1 10.1.1.2 80 > nc-1.log]) +NS_CHECK_EXEC([at_ns0], [echo "TEST1" | nc -p 41001 -s 10.1.1.11 10.1.1.2 80 > nc-11.log]) + +conntrack -L 2>&1 + +AT_CHECK([conntrack -L 2>&1 | FORMAT_CT(10.1.1.2) | sed -e 's/dst=10.1.1.2[[45]][[0-9]]/dst=10.1.1.2XX/'], [0], [dnl +TIME_WAIT src=10.1.1.11 dst=10.1.1.2 sport= dport= src=10.1.1.2 dst=10.1.1.2XX sport= dport= [[ASSURED]] mark=0 zone=1 use=1 +]) + +OVS_TRAFFIC_VSWITCHD_STOP +AT_CLEANUP