Skip to content

Commit

Permalink
olsrd: use isolated on eth0 during supernode mode
Browse files Browse the repository at this point in the history
  • Loading branch information
USA-RedDragon committed Aug 17, 2023
1 parent 5cd660e commit 1c45b27
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions internal/olsrd/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,18 @@ LoadPlugin "olsrd_watchdog.so.0.1"
{
PlParam "file" "/tmp/olsrd.watchdog"
PlParam "interval" "5"
}
}`

Interface "eth0"
snippetOlsrdConfEth0Supernode = `Interface "eth0"
{
Mode "ether"
}`

snippetOlsrdConfEth0Standard = `Interface "eth0"
{
Mode "isolated"
}`

snippetOlsrdConfNameservice = `LoadPlugin "olsrd_nameservice.so.0.4"
{
PlParam "interval" "30"
Expand Down Expand Up @@ -96,6 +101,12 @@ func GenerateAndSave(config *config.Config, db *gorm.DB) error {
func Generate(config *config.Config, db *gorm.DB) string {
ret := snippetOlsrdConf
ret += "\n\n"
if config.Supernode {
ret += snippetOlsrdConfEth0Supernode
} else {
ret += snippetOlsrdConfEth0Standard
}
ret += "\n\n"

// We need to replace shell variables in the template with the actual values
cpSnippetOlsrdConfNameservice := snippetOlsrdConfNameservice
Expand Down
2 changes: 1 addition & 1 deletion internal/sdk/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ var (
GitCommit string

// Version of the program
Version = "0.0.6" //nolint:golint,gochecknoglobals
Version = "0.0.7" //nolint:golint,gochecknoglobals
)

0 comments on commit 1c45b27

Please sign in to comment.