diff mbox series

[ovs-dev,v1] conntrack: Consolidate 2 selection statements.

Message ID 1551141470-85668-1-git-send-email-dlu998@gmail.com
State Accepted
Commit 1c8689d78bd263df0d77b6309aa818f93320b04d
Headers show
Series [ovs-dev,v1] conntrack: Consolidate 2 selection statements. | expand

Commit Message

Darrell Ball Feb. 26, 2019, 12:37 a.m. UTC
No functional change.

Signed-off-by: Darrell Ball <dlu998@gmail.com>
---
 lib/conntrack.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Ben Pfaff Feb. 26, 2019, 1:04 a.m. UTC | #1
On Mon, Feb 25, 2019 at 04:37:50PM -0800, Darrell Ball wrote:
> No functional change.
> 
> Signed-off-by: Darrell Ball <dlu998@gmail.com>

Applied, thanks!
diff mbox series

Patch

diff --git a/lib/conntrack.c b/lib/conntrack.c
index 7ead3ad..691782c 100644
--- a/lib/conntrack.c
+++ b/lib/conntrack.c
@@ -2187,12 +2187,9 @@  nat_select_range_tuple(struct conntrack *ct, const struct conn *conn,
     while (true) {
         if (conn->nat_info->nat_action & NAT_ACTION_SRC) {
             nat_conn->rev_key.dst.addr = ct_addr;
-        } else {
-            nat_conn->rev_key.src.addr = ct_addr;
-        }
-        if (conn->nat_info->nat_action & NAT_ACTION_SRC) {
             nat_conn->rev_key.dst.port = htons(port);
         } else {
+            nat_conn->rev_key.src.addr = ct_addr;
             nat_conn->rev_key.src.port = htons(port);
         }