Bug 8884: SNAT traffic is getting dropped when router gateway is removed 30/60730/2
authorkarthikeyan <karthikeyan.k@altencalsoftlabs.com>
Tue, 25 Jul 2017 11:39:55 +0000 (17:09 +0530)
committerSam Hague <shague@redhat.com>
Mon, 31 Jul 2017 17:34:59 +0000 (17:34 +0000)
commitb17ee40477c9ef04afcd2ec01a64d022fffd12e8
treeba590fcdfb5aec6bcbe4d6bd40fcf996ee523667
parent7a158ebf248cc581f59c89ebe553d07788a828bf
Bug 8884: SNAT traffic is getting dropped when router gateway is removed

Problem Description:
====================
Issue 1
+++++++

SNAT traffic is getting dropped for second router when gateway is removed
from first router.

Consider the following topology.

1) 2 Internal Network + 2 Subnets
2) 2 Routers with each subnet associated to it.
3) One External network and both router associated to same External
Network.
4) One External BGPVN.

when both Routers, if the same NAPT switch is elected, it will have a
common NAPT PFIB TABLE which forwards the outgoing packet. In such
scenario, when the gateway is removed for one of the routers,
this flow gets removed effecting the other routers traffic.

Solution for Issue 1:
+++++++++++++++++++++
Changes done to prevent this NAPT PFIB table flow(47->21) deletion if
there exists
any other router having same DPN as NAPT Switch.

Issue 2:
++++++++
Label of external-fixed-ip is freed from vpnservice pool when NAPT
switchover happens for SNAT.

Solution for Issue 2:
+++++++++++++++++++++
Changes done to prevent release of label allocated for external-fixed-ip
when Switch-Over Happens.

Change-Id: I0d34ee1140f0d2b800d82271b6f0604bbb8bb9c1
Signed-off-by: karthikeyan <karthikeyan.k@altencalsoftlabs.com>
vpnservice/natservice/natservice-impl/src/main/java/org/opendaylight/netvirt/natservice/internal/ExternalRoutersListener.java
vpnservice/natservice/natservice-impl/src/main/java/org/opendaylight/netvirt/natservice/internal/NaptSwitchHA.java
vpnservice/natservice/natservice-impl/src/main/java/org/opendaylight/netvirt/natservice/internal/NatUtil.java