Bug 7667: SNAT table 46&44 are not getting programmed when private BGPVPN 94/50994/4
authorkarthikeyan <karthikeyan.k@altencalsoftlabs.com>
Wed, 25 Jan 2017 08:05:05 +0000 (13:35 +0530)
committerAlon Kochba <alonko@hpe.com>
Tue, 31 Jan 2017 13:52:39 +0000 (13:52 +0000)
commitef31c925bfde8187b325596d1ddd5bef74e29632
treeee12e58417545deeb9c63336f3613be5a317a3b9
parent67b330a82e52920197a92de1a4bcad543d77d73e
Bug 7667: SNAT table 46&44 are not getting programmed when private BGPVPN

Problem Description:
=====================
SNAT: Table 46(OUTBOUND_NAPT) and table 44 (INBOUND_NAPT) are not getting
programmed (SNAT Forward Traffic and SNAT Reverse Traffic) with NAT
translation when router is
associated with Private/Internal BGP-VPN.Due to this issue, SNAT traffic
is getting failed when interval bgp-vpn is configured.

Root Cause of the Problem:
==========================
As part of bug (Bug 7478) fix SNAT traffic is used to send router-gw mac
address instead of VM mac. With this code changes router gw-mac was
getting from external-router Yang Model using router name as key.

When private/internal bgp-vpn is configured router-id (Internal Private
VPN ID) should be replaced with created private/internal bgp-vpn id. With
this approach when querying external-router Yang model for getting
router-gw mac address using new router-id (bgp-vpn id) will not match with
router-name.

Solution:
===========
When querying external-router yang model for getting router-gw mac address
it should use old router-id instead of bgp-vpn id. For doing this change
in NAPTEventHandler re-aligned the router-gw mac address code to
appropriate place to be working as expected.

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