docs: improve docs about pppoe and mark (#305)

Co-authored-by: kev <yqlbu@bu.edu>
Co-authored-by: dae-bot[bot] <136105375+dae-bot[bot]@users.noreply.github.com>
This commit is contained in:
mzz
2023-09-02 15:06:50 +08:00
committed by GitHub
parent a333079686
commit b9b1624b0b
6 changed files with 97 additions and 107 deletions

View File

@ -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 {