From: radhika Date: Tue, 1 Aug 2017 17:10:35 +0000 (-0700) Subject: Zebra: Fix ptm-enable config failure on internally created interfaces X-Git-Tag: frr-6.1-dev~455^2~3 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=a2023fab273dd7cf34a3a9fed1361b7c25c65bb0;p=matthieu%2Ffrr.git Zebra: Fix ptm-enable config failure on internally created interfaces Ticket: CM-15658 Reviewed By: CCR-6534 Testing Done: Unit Issue: frr ptm-enable command not working for interfaces that have been created by frr as a place holder. Root Cause: The ptm-enable on interface configuration was not getting stored when the interface was internally created by frr. Fix: Store the ptm-enable configuration even if the interface is internally created. Signed-off-by: Radhika Mahankali --- diff --git a/zebra/zebra_ptm.c b/zebra/zebra_ptm.c index 07e81aa020..d20f93f521 100644 --- a/zebra/zebra_ptm.c +++ b/zebra/zebra_ptm.c @@ -298,6 +298,9 @@ DEFUN (zebra_ptm_enable_if, int old_ptm_enable; int send_linkdown = 0; + if_data = ifp->info; + if_data->ptm_enable = ZEBRA_IF_PTM_ENABLE_UNSPEC; + if (ifp->ifindex == IFINDEX_INTERNAL) { return CMD_SUCCESS; } @@ -317,9 +320,6 @@ DEFUN (zebra_ptm_enable_if, } } - if_data = ifp->info; - if_data->ptm_enable = ZEBRA_IF_PTM_ENABLE_UNSPEC; - return CMD_SUCCESS; }