Skip to content

Commit

Permalink
Bugfix/snc 15818 and snc 16412 (sonic-net#35)
Browse files Browse the repository at this point in the history
* Fix for SNC-15818 and SNC-16412

* Self review comments

Co-authored-by: Gokulnath Raja <g_raja@dell.com>
  • Loading branch information
2 people authored and GitHub Enterprise committed Feb 4, 2022
1 parent fd75b3d commit 343e16d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions translib/transformer/xfmr_ip_rib.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,10 @@ var DbToYang_ipv4_mroute_get_xfmr SubTreeXfmrDbToYang = func(inParams XfmrParams
srcAddrKey := pathInfo.Var("source-address")
oifKey := pathInfo.Var("outgoing-interface")

if (srcAddrKey != "") && (srcAddrKey == "0.0.0.0") {
srcAddrKey = "*"
}

log.Info("DbToYang_ipv4_mroute_get_xfmr: ", cmnLog, " ==> URI: ", inParams.uri,
" niName:", niName, " grpAddrKey:", grpAddrKey, " srcAddrKey:", srcAddrKey)

Expand Down Expand Up @@ -625,6 +629,10 @@ var DbToYang_ipv4_mroute_get_xfmr SubTreeXfmrDbToYang = func(inParams XfmrParams
continue
}

if srcAddr == "*" {
srcAddr = "0.0.0.0"
}

srcEntriesObj := ipv4EntryObj.SrcEntries
if srcEntriesObj == nil {
var _srcEntriesObj ocbinds.OpenconfigNetworkInstance_NetworkInstances_NetworkInstance_Afts_Ipv4Multicast_Ipv4Entries_Ipv4Entry_SrcEntries
Expand Down
8 changes: 8 additions & 0 deletions translib/transformer/xfmr_pim.go
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,10 @@ var DbToYang_pim_tib_state_xfmr SubTreeXfmrDbToYang = func(inParams XfmrParams)
routeTypeKey := pathInfo.Var("route-type")
oifKey := pathInfo.Var("outgoing-interface")

if (srcAddrKey != "") && (srcAddrKey == "0.0.0.0") {
srcAddrKey = "*"
}

log.Info("DbToYang_pim_tib_state_xfmr: ", cmnLog, " ==> URI: ", inParams.uri, " niName:", niName,
" grpAddrKey:", grpAddrKey, " srcAddrKey:", srcAddrKey, " routeTypeKey:", routeTypeKey, " oifKey:", oifKey)

Expand Down Expand Up @@ -964,6 +968,10 @@ var DbToYang_pim_tib_state_xfmr SubTreeXfmrDbToYang = func(inParams XfmrParams)
continue
}

if srcAddr == "*" {
srcAddr = "0.0.0.0"
}

srcEntriesObj := ipv4EntryObj.SrcEntries
if srcEntriesObj == nil {
var _srcEntriesObj ocbinds.OpenconfigNetworkInstance_NetworkInstances_NetworkInstance_Protocols_Protocol_Pim_Global_Tib_Ipv4Entries_Ipv4Entry_SrcEntries
Expand Down

0 comments on commit 343e16d

Please sign in to comment.