mirror of
https://github.com/daeuniverse/dae.git
synced 2025-01-05 21:11:55 +07:00
chore: replace route 0.0.0.0/0 with default
This commit is contained in:
parent
9b38fa97e6
commit
6f1ec9a4d6
@ -121,7 +121,7 @@ func (c *ControlPlaneCore) BindLan(ifname string) error {
|
||||
var output []byte
|
||||
if output, err = exec.Command("sh", "-c", `
|
||||
ip rule add fwmark 0x80000000/0x80000000 table 2023
|
||||
ip route add local 0.0.0.0/0 dev lo table 2023
|
||||
ip route add local default dev lo table 2023
|
||||
ip -6 rule add fwmark 0x80000000/0x80000000 table 2023
|
||||
ip -6 route add local ::/0 dev lo table 2023
|
||||
`).CombinedOutput(); err != nil {
|
||||
@ -130,7 +130,7 @@ func (c *ControlPlaneCore) BindLan(ifname string) error {
|
||||
c.deferFuncs = append(c.deferFuncs, func() error {
|
||||
return exec.Command("sh", "-c", `
|
||||
ip rule del fwmark 0x80000000/0x80000000 table 2023
|
||||
ip route del local 0.0.0.0/0 dev lo table 2023
|
||||
ip route del local default dev lo table 2023
|
||||
ip -6 rule del fwmark 0x80000000/0x80000000 table 2023
|
||||
ip -6 route del local ::/0 dev lo table 2023
|
||||
`).Run()
|
||||
|
@ -1179,12 +1179,12 @@ int tproxy_lan_ingress(struct __sk_buff *skb) {
|
||||
|
||||
/**
|
||||
ip rule add fwmark 0x80000000/0x80000000 table 2023
|
||||
ip route add local 0.0.0.0/0 dev lo table 2023
|
||||
ip route add local default dev lo table 2023
|
||||
ip -6 rule add fwmark 0x80000000/0x80000000 table 2023
|
||||
ip -6 route add local ::/0 dev lo table 2023
|
||||
|
||||
ip rule del fwmark 0x80000000/0x80000000 table 2023
|
||||
ip route del local 0.0.0.0/0 dev lo table 2023
|
||||
ip route del local default dev lo table 2023
|
||||
ip -6 rule del fwmark 0x80000000/0x80000000 table 2023
|
||||
ip -6 route del local ::/0 dev lo table 2023
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user