Commit Graph

18 Commits

Author SHA1 Message Date
Carlos Eduardo Arango Gutierrez
a435ad33f4
Cleanup: pkg/util/ipset
Signed-off-by: Carlos Eduardo Arango Gutierrez <carangog@redhat.com>
2022-03-25 14:14:17 -04:00
Mengjiao Liu
63667626d9 Fix incorrect test cases to cover code that needs to be tested in TestValidateIPSet 2022-02-25 16:01:37 +08:00
Kubernetes Prow Robot
10744811f5
Merge pull request #95701 from masap/ipset2
ipset: Address a TODO, add test for netmask
2020-12-08 23:34:50 -08:00
Masashi Honma
c6d2808ad6 ipset: Address a TODO, add test for TestEntry() with IPv6 address
This TODO was introduced by
commit 45ad69765e "wrapper ipset util".

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2020-10-22 08:20:24 +09:00
Masashi Honma
4d30435f24 ipset: Address a TODO, add test for netmask
This PR removes a TODO comment by adding some netmask tests. The TODO comment
introduced by commit e768924a62 "validate entry in ipset".

// TODO: CIDR /32 may not be valid

The comment says that 32 is invalid netmask, but in reality values ​​from 0 to
32 are valid because the result of the Linux ipset command says so.

$ sudo ipset create foo hash:ip,port,net
$ sudo ipset add foo 10.20.30.40,53,192.168.3.1/33
ipset v7.5: Syntax error: '33' is out of range 0-32
$ sudo ipset --version
ipset v7.5, protocol version: 7

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2020-10-19 20:22:02 +09:00
SataQiu
2497a1209b bump k8s.io/utils version 2019-12-21 14:54:44 +08:00
Yi Tao
d1f85ffa71 fix TestEntry 2019-01-29 20:57:26 +08:00
Laszlo Janosi
cbe94df8c6 gofmt update 2018-08-27 05:59:50 +00:00
Laszlo Janosi
a6da2b1472 K8s SCTP support implementation for the first pull request
The requested Service Protocol is checked against the supported protocols of GCE Internal LB. The supported protocols are TCP and UDP.

SCTP is not supported by OpenStack LBaaS. If SCTP is requested in a Service with type=LoadBalancer, the request is rejected. Comment style is also corrected.

SCTP is not allowed for LoadBalancer Service and for HostPort. Kube-proxy can be configured not to start listening on the host port for SCTP: see the new SCTPUserSpaceNode parameter

changed the vendor github.com/nokia/sctp to github.com/ishidawataru/sctp. I.e. from now on we use the upstream version.

netexec.go compilation fixed. Various test cases fixed

SCTP related conformance tests removed. Netexec's pod definition and Dockerfile are updated to expose the new SCTP port(8082)

SCTP related e2e test cases are removed as the e2e test systems do not support SCTP

sctp related firewall config is removed from cluster/gce/util.sh. Variable name sctp_addr is corrected to sctpAddr in pkg/proxy/ipvs/proxier.go

cluster/gce/util.sh is copied from master
2018-08-27 05:56:27 +00:00
Kubernetes Submit Queue
39e341c11f
Merge pull request #66639 from hanxiaoshuai/fix07251
Automatic merge from submit-queue (batch tested with PRs 66592, 66639). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

refactor some hard code in pkg/util/ipset/ipset.go

**What this PR does / why we need it**:
refactor some hard code in pkg/util/ipset/ipset.go
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-08-19 22:40:00 -07:00
hangaoshuai
f189015c03 add unit test for func EntryString in util/ipset 2018-07-28 17:47:14 +08:00
hangaoshuai
5dfb0a2d60 add unit tests for checkIPandProtocol and setIPSetDefaults 2018-07-26 10:56:22 +08:00
linweibin
db7b59dc0d fix TODO: test more SetType 2018-03-08 21:00:13 +08:00
m1093782566
477b0f0636 fix review comments 2018-02-02 10:08:43 +08:00
m1093782566
e768924a62 validate entry in ipset 2018-02-02 10:08:43 +08:00
m1093782566
4e0b4fca94 validate set in ipset 2018-02-02 10:08:43 +08:00
m1093782566
9e9e264964 refactor ipset interface AddEntry() 2018-02-02 10:08:43 +08:00
m1093782566
45ad69765e wrapper ipset util 2017-11-14 21:48:44 +08:00