Method
AddDropIPv6Rule
(ip []byte, userData []byte)
Source from the content-addressed store, hash-verified
| 121 | } |
| 122 | |
| 123 | func (this *Chain) AddDropIPv6Rule(ip []byte, userData []byte) (*Rule, error) { |
| 124 | return this.AddRule(&RuleOptions{ |
| 125 | Exprs: []expr.Any{ |
| 126 | &expr.Payload{ |
| 127 | DestRegister: 1, |
| 128 | Base: expr.PayloadBaseNetworkHeader, |
| 129 | Offset: 8, |
| 130 | Len: 16, |
| 131 | }, |
| 132 | &expr.Cmp{ |
| 133 | Op: expr.CmpOpEq, |
| 134 | Register: 1, |
| 135 | Data: ip, |
| 136 | }, |
| 137 | &expr.Verdict{ |
| 138 | Kind: expr.VerdictDrop, |
| 139 | }, |
| 140 | }, |
| 141 | UserData: userData, |
| 142 | }) |
| 143 | } |
| 144 | |
| 145 | func (this *Chain) AddRejectIPv4Rule(ip []byte, userData []byte) (*Rule, error) { |
| 146 | return this.AddRule(&RuleOptions{ |
Callers
nothing calls this directly
Tested by
no test coverage detected