Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改为sql数据库 #45

Merged
merged 13 commits into from
Jul 22, 2021
Prev Previous commit
Next Next commit
修复没有ipv6报错的问题
  • Loading branch information
bjdgyc committed Jul 16, 2021
commit a8038f8fe9a7fbe7225051b27b4d7729a63140c1
6 changes: 3 additions & 3 deletions server/handler/link_tap.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ func LinkTap(cSess *sessdata.ConnSession) error {

// arp on
cmdstr1 := fmt.Sprintf("ip link set dev %s up mtu %d multicast on", ifce.Name(), cSess.Mtu)
cmdstr2 := fmt.Sprintf("sysctl -w net.ipv6.conf.%s.disable_ipv6=1", ifce.Name())
cmdstr3 := fmt.Sprintf("ip link set dev %s master %s", ifce.Name(), bridgeName)
cmdStrs := []string{cmdstr1, cmdstr2, cmdstr3}
cmdstr2 := fmt.Sprintf("ip link set dev %s master %s", ifce.Name(), bridgeName)
// cmdstr3 := fmt.Sprintf("sysctl -w net.ipv6.conf.%s.disable_ipv6=1", ifce.Name())
cmdStrs := []string{cmdstr1, cmdstr2}
err = execCmd(cmdStrs)
if err != nil {
base.Error(err)
Expand Down
4 changes: 2 additions & 2 deletions server/handler/link_tun.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ func LinkTun(cSess *sessdata.ConnSession) error {
cmdstr1 := fmt.Sprintf("ip link set dev %s up mtu %d multicast off", ifce.Name(), cSess.Mtu)
cmdstr2 := fmt.Sprintf("ip addr add dev %s local %s peer %s/32",
ifce.Name(), base.Cfg.Ipv4Gateway, cSess.IpAddr)
cmdstr3 := fmt.Sprintf("sysctl -w net.ipv6.conf.%s.disable_ipv6=1", ifce.Name())
cmdStrs := []string{cmdstr1, cmdstr2, cmdstr3}
// cmdstr3 := fmt.Sprintf("sysctl -w net.ipv6.conf.%s.disable_ipv6=1", ifce.Name())
cmdStrs := []string{cmdstr1, cmdstr2}
err = execCmd(cmdStrs)
if err != nil {
base.Error(err)
Expand Down