kube-ovn
kube-ovn copied to clipboard
[BUG] ipv4 subnet cidr 0.0.0.0/0 should be checked as a invalid cidr
Kube-OVN Version
master
Kubernetes Version
1.21
Operation-system/Kernel Version
4.19
Description
# k get subnet autoapi-vxlan-4385 -o yaml
apiVersion: kubeovn.io/v1
kind: Subnet
metadata:
annotations:
cluster.ecloud.cmss.com/resource: "true"
creationTimestamp: "2024-08-08T02:29:21Z"
generation: 2
labels:
eis.io/creator: admin
name: autoapi-vxlan-4385
resourceVersion: "245557324"
uid: 1181f275-fa69-4f36-84d2-a9b7eacc17ee
spec:
cidrBlock: 0.0.0.0/0
default: false
disableGatewayCheck: true
disableInterConnection: true
enableLb: false
excludeIps:
- 0.0.0.1
gateway: 0.0.0.1
gatewayNode: ""
gatewayType: distributed
natOutgoing: true
private: false
protocol: IPv4
provider: ovn
vpc: autoapi-vpc8313
status:
activateGateway: ""
conditions:
- lastTransitionTime: "2024-08-08T02:29:21Z"
lastUpdateTime: "2024-08-08T02:29:21Z"
message: 0.0.0.0/0 conflict with v4 broadcast cidr 255.255.255.255/32
reason: ValidateLogicalSwitchFailed
status: "True"
type: Error
- lastTransitionTime: "2024-08-08T02:29:21Z"
lastUpdateTime: "2024-08-08T02:29:21Z"
message: 0.0.0.0/0 conflict with v4 broadcast cidr 255.255.255.255/32
reason: ValidateLogicalSwitchFailed
status: "False"
type: Validated
- lastTransitionTime: "2024-08-08T02:29:21Z"
lastUpdateTime: "2024-08-08T02:29:21Z"
message: 0.0.0.0/0 conflict with v4 broadcast cidr 255.255.255.255/32
reason: ValidateLogicalSwitchFailed
status: "False"
type: Ready
dhcpV4OptionsUUID: ""
dhcpV6OptionsUUID: ""
u2oInterconnectionIP: ""
u2oInterconnectionMAC: ""
u2oInterconnectionVPC: ""
v4availableIPrange: 0.0.0.2-255.255.255.254
v4availableIPs: 4294967293
v4usingIPrange: ""
v4usingIPs: 0
v6availableIPrange: ""
v6availableIPs: 0
v6usingIPrange: ""
v6usingIPs: 0
Steps To Reproduce
- create a subnet ipv4 cidr is 0.0.0.0/0
Current Behavior
0.0.0.0/0 conflict with v4 broadcast cidr 255.255.255.255/32
Expected Behavior
0.0.0.0/0 is an invalid subnet cidr, it is used in some special case, can not used in subnet cidr