Skip to content

Commit

Permalink
sysctl net.ipv6.conf.all.forwarding=1 inside netns
Browse files Browse the repository at this point in the history
  • Loading branch information
jschwinger233 committed Apr 13, 2024
1 parent 89a0596 commit cd3af5f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion control/netns_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,15 @@ func (ns *DaeNetns) setupSysctl() (err error) {
return fmt.Errorf("failed to set forwarding for dae0: %v", err)
}

// *_early_demux is not mandatory, but it's recommended to enable it for better performance
if err = netns.Set(ns.daeNs); err != nil {
return fmt.Errorf("failed to switch to daens: %v", err)
}
defer netns.Set(ns.hostNs)

// sysctl net.ipv6.conf.all.forwarding=1
SetForwarding("all", "1")

// *_early_demux is not mandatory, but it's recommended to enable it for better performance
sysctl.Set("net.ipv4.tcp_early_demux", "1", false)
sysctl.Set("net.ipv4.ip_early_demux", "1", false)
return
Expand Down

0 comments on commit cd3af5f

Please sign in to comment.