aporeto-inc / trireme-lib

Simple, scalable and secure application segmentation
https://trireme.io
Apache License 2.0
300 stars 51 forks source link

protocol == 6 #937

Open likhita-8091 opened 4 years ago

likhita-8091 commented 4 years ago
    for _, proto := range rule.Protocols {
        // TODO: 有疑惑。设置受trireme保护的网络作用域会调用此方法,而且协议等于6,但是生成puContext也会调用此方法,协议不可能等于6。这个单一判断无法同时满足。。
        //if strings.ToLower(proto) != constants.TCPProtoNum {
        //  continue
        //}
        for _, address := range rule.Addresses {
            for _, port := range rule.Ports {
                if err := addCache(address, port); err != nil {
                    return err
                }
            }
        }
    }