File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ func main() {
4646 edgevpn .WithInterfaceAddress (os .Getenv ("ADDRESS" )),
4747 edgevpn .WithInterfaceName (os .Getenv ("IFACE" )),
4848 edgevpn .WithInterfaceType (water .TAP ),
49+ edgevpn .NetLinkBootstrap (true ),
4950 }
5051
5152 opts = append (opts , edgevpn .FromYaml (os .Getenv ("EDGEVPNCONFIG" )))
Original file line number Diff line number Diff line change @@ -58,8 +58,10 @@ func (e *EdgeVPN) Start() error {
5858
5959func (e * EdgeVPN ) writePackets (ifce * water.Interface ) error {
6060
61- if err := e .prepareInterface (); err != nil {
62- return err
61+ if e .config .NetLinkBootstrap {
62+ if err := e .prepareInterface (); err != nil {
63+ return err
64+ }
6365 }
6466
6567 mw , err := e .MessageWriter ()
Original file line number Diff line number Diff line change @@ -91,6 +91,13 @@ func ListenAddresses(s string) func(cfg *Config) error {
9191 }
9292}
9393
94+ func NetLinkBootstrap (b bool ) func (cfg * Config ) error {
95+ return func (cfg * Config ) error {
96+ cfg .NetLinkBootstrap = b
97+ return nil
98+ }
99+ }
100+
94101func Insecure (b bool ) func (cfg * Config ) error {
95102 return func (cfg * Config ) error {
96103 cfg .Insecure = b
You can’t perform that action at this time.
0 commit comments