Skip to content

Commit aa4d551

Browse files
song-jiangCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 3ede7f9 commit aa4d551

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

confd/pkg/resource/template/template_funcs.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,11 +383,12 @@ func hasPeerTypeRules(rules []filterArgs) bool {
383383

384384
// BGPFilterBIRDFuncs generates the definitions of a set of BIRD functions for all configured BGPFilter resources.
385385
//
386-
// When any rule within a filter uses PeerType, the generated function takes a bool parameter:
386+
// For each direction (import/export), if any rule for that direction within a filter uses PeerType,
387+
// the generated function for that direction takes a bool parameter:
387388
//
388389
// function 'bgp_myfilter_importFilterV4'(bool is_same_as) { ... }
389390
//
390-
// Rules with PeerType are then wrapped in if (is_same_as) / if (!is_same_as) guards.
391+
// Within such a function, rules with PeerType are wrapped in if (is_same_as) / if (!is_same_as) guards.
391392
func BGPFilterBIRDFuncs(pairs memkv.KVPairs, version int) ([]string, error) {
392393
var lines []string
393394
var versionStr string

0 commit comments

Comments
 (0)