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

docs: improve docs about pppoe and mark #305

Merged
merged 8 commits into from
Sep 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ loop:
sdnotify.Ready()
continue
}
newConf.Global = deepcopy.Copy(conf.Global).(config.Global)
newConf.Global.WanInterface = nil
newConf.Global.LanInterface = nil
newConf.Global.LogLevel = "warning"
} else {
var includes []string
newConf, includes, err = readConfig(cfgFile)
Expand Down
4 changes: 2 additions & 2 deletions common/consts/ebpf.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,6 @@ const (
)

const (
LinkType_None uint32 = iota
LinkType_Ethernet
LinkHdrLen_None uint32 = 0
LinkHdrLen_Ethernet uint32 = 14
)
9 changes: 5 additions & 4 deletions control/control_plane_core.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,16 @@ func (c *controlPlaneCore) mapLinkType(ifname string) error {
if err != nil {
return err
}
linkType := uint32(0xffff)
var linkHdrLen uint32
switch link.Attrs().EncapType {
case "none":
linkType = consts.LinkType_None
linkHdrLen = consts.LinkHdrLen_None
case "ether":
linkType = consts.LinkType_Ethernet
linkHdrLen = consts.LinkHdrLen_Ethernet
default:
return nil
}
return c.bpf.bpfMaps.LinktypeMap.Update(uint32(link.Attrs().Index), linkType, ebpf.UpdateAny)
return c.bpf.bpfMaps.LinklenMap.Update(uint32(link.Attrs().Index), linkHdrLen, ebpf.UpdateAny)
}

func (c *controlPlaneCore) addQdisc(ifname string) error {
Expand Down
Loading