TWSD-771 GENEVE tunnel interface permanently associated to vlan
Review Request #883 — Created May 23, 2025 and submitted — Latest diff uploaded
| Information | |
|---|---|
| jasonchang | |
| APV10 | |
| rel_apv_10_7 | |
| Reviewers | |
| mingji, shuinvy, timlai | |
Issue:
Once a GENEVE tunnel interface is associated with a specific VLAN interface, the association becomes unrecoverable if the user deletes the VLAN interface first.Fix:
Before removing a VLAN interface, the system now checks whether it is associated with any GENEVE tunnel interface.
If such an association exists, an error message is displayed and the removal is blocked.
AN(config)#show geneve all
geneve enable
geneve port 6081
geneve learn on
geneve tunnel "gt" 20.20.20.2 20.20.20.1
geneve tunnel "gtv6" 3001::2 3001::1
geneve interface "gif10" 10
geneve bind "gif10" "gt"
ip address "gif10" 11.11.11.2 255.255.255.0
ip address "gif10" 5001::2 64
geneve interface "gif11" 11
geneve bind "gif11" "gtv6"
ip address "gif11" 6001::2 64
geneve interface "gif12" 12
geneve bind "gif12" "gt"
geneve bind "gif12" "gtv6"
geneve associate gif12 vlan10
geneve interface "gif33" 33
geneve associate gif33 vlantestAN(config)#no vlan vlantest
Please remove vlan-geneve association first. // error message is displayed and the removal is blocked.
Failed to execute "no vlan vlantest"// .patch file
Index: usr/click/lib/libip/sip.c
===================================================================
--- usr/click/lib/libip/sip.c (revision 39235)
+++ usr/click/lib/libip/sip.c (working copy)
@@ -5293,6 +5293,12 @@
return VLAN_ERROR;
}
- if (vlan_p[vlan_num].is_geneve_associated) {
- printf("Please remove vlan-geneve association first.\n");
- shmdt(vlan_p);
- return VLAN_ERROR;
- }
+
/ bug58987: vlan interface with qos configured cannot be deleted/
bzero((char )&vreq, sizeof(struct vlanreq));
bzero((char )&ifr, sizeof(struct ifreq));
@@ -5612,6 +5618,11 @@
perror("Please clear vlan-vxlan association first.\n");
return VLAN_ERROR;
}
+ - if (vlan_p[i].is_geneve_associated) {
- perror("Please clear vlan-geneve association first.\n");
- return VLAN_ERROR;
-
}
/Link Aggregation,beisf,20051229/
if (vlan_p[i].parent_ifname[0] != '\0' &&
vlan_p[i].is_segment == is_segment) {
@@ -6336,6 +6347,11 @@
return IP_ERROR;
} -
if (vlan.is_geneve_associated) {
- printf("Please remove vlan-geneve association first.\n");
- return IP_ERROR;
-
}
+
/ bug 22548, 22866, etc, chengfei, 20090706/
if ( (ip32 & mask32) != ( vlan.ip32 & vlan.mask32 ) ){
/ ip is changing from one subnet to another /
@@ -23149,6 +23165,12 @@
return IP_ERROR;
} -
/geneve association check/
- if (vlan.is_geneve_associated) {
- printf("Please remove vlan-geneve association first.\n");
- return IP_ERROR;
- }
+
/ bug 22548, 22866, etc, chengfei, 20090706/
if ( !ipv6_net_eq(ip6, prefixlen, vlan.v6, vlan.prefixlen)){
/ ip is changing from one subnet to another /
