MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / AddRejectIPv6Rule

Method AddRejectIPv6Rule

internal/firewalls/nftables/chain.go:165–183  ·  view source on GitHub ↗
(ip []byte, userData []byte)

Source from the content-addressed store, hash-verified

163}
164
165func (this *Chain) AddRejectIPv6Rule(ip []byte, userData []byte) (*Rule, error) {
166 return this.AddRule(&RuleOptions{
167 Exprs: []expr.Any{
168 &expr.Payload{
169 DestRegister: 1,
170 Base: expr.PayloadBaseNetworkHeader,
171 Offset: 8,
172 Len: 16,
173 },
174 &expr.Cmp{
175 Op: expr.CmpOpEq,
176 Register: 1,
177 Data: ip,
178 },
179 &expr.Reject{},
180 },
181 UserData: userData,
182 })
183}
184
185func (this *Chain) AddAcceptIPv4SetRule(setName string, userData []byte) (*Rule, error) {
186 return this.AddRule(&RuleOptions{

Callers

nothing calls this directly

Calls 1

AddRuleMethod · 0.95

Tested by

no test coverage detected