-
Bug
-
Resolution: Won't Do
-
Normal
-
4.19
-
None
-
Quality / Stability / Reliability
-
False
-
-
None
-
Moderate
-
No
-
None
-
Rejected
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Description of problem:
192.168.12.0/24 and FD00:192:168:12::/64 are NOT a valid address to be assigned to an interface, the test results showed both ipv4 network address and ipv6 prefix are assigned to pod's secondary interface.
Version-Release number of selected component (if applicable):
4.19.0-0.nightly-2025-04-23-103823
How reproducible:
Always
Steps to Reproduce:
Follow below steps to reproduce the bug:
$ cat test-NAD.yaml
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
name: bridge-static
spec:
config: |
{
"cniVersion": "0.4.0",
"name": "bridge-static",
"type": "bridge",
"ipam": {
"type": "static",
"addresses": [
{
"address": "192.168.12.0/24",
"gateway": "192.168.12.254"
},
{
"address": "FD00:192:168:12::/64",
"gateway": "FD00:192:168:10::ffff"
}
]
}
}
$ cat test-POD.yaml
apiVersion: v1
kind: ReplicationController
metadata:
name: bridge-static-pod
spec:
replicas: 1
template:
metadata:
labels:
name: blue
annotations:
k8s.v1.cni.cncf.io/networks: bridge-static
spec:
containers:
- name: bridge-static-pod
image: quay.io/openshifttest/hello-sdn@sha256:c89445416459e7adea9a5a416b3365ed3d74f2491beb904d61dc8d1eb89a72a4
ports:
- containerPort: 8080
- containerPort: 443
env:
- name: RESPONSE
value: bridge-static-pod
securityContext:
capabilities:
add:
- NET_ADMIN
privileged: true$ oc create -f test-NAD.yaml
networkattachmentdefinition.k8s.cni.cncf.io/bridge-static created
$ oc create -f test-POD.yaml
replicationcontroller/bridge-static-pod created
$ oc get pod
NAME READY STATUS RESTARTS AGE
bridge-static-pod-5b5n4 1/1 Running 0 3s
$ oc exec bridge-static-pod-5b5n4 -- ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0@if53: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 8901 qdisc noqueue state UP group default
link/ether 0a:58:0a:83:00:2c brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 10.131.0.44/23 brd 10.131.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::858:aff:fe83:2c/64 scope link
valid_lft forever preferred_lft forever
3: net1@if54: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether da:b8:47:16:0e:cf brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 192.168.12.0/24 brd 192.168.12.255 scope global net1
valid_lft forever preferred_lft forever
inet6 fd00:192:168:12::/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::d8b8:47ff:fe16:ecf/64 scope link
valid_lft forever preferred_lft forever
Actual results:
3: net1@if54: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether da:b8:47:16:0e:cf brd ff:ff:ff:ff:ff:ff link-netnsid 0 inet 192.168.12.0/24 brd 192.168.12.255 scope global net1 valid_lft forever preferred_lft forever inet6 fd00:192:168:12::/64 scope global valid_lft forever preferred_lft forever inet6 fe80::d8b8:47ff:fe16:ecf/64 scope link valid_lft forever preferred_lft forever
Expected results:
ipv4 network address and ipv6 prefix should not be assiged to pod's secondary interface
Additional info: