Skip to content

Commit cab1a3c

Browse files
author
Aritra Basu
committed
do not add ipv4 & ipv6 on the tap
Signed-off-by: Aritra Basu <[email protected]>
1 parent 3e0b4d1 commit cab1a3c

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

vpp-manager/vpp_runner.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -445,24 +445,6 @@ func (v *VppRunner) setupTapVRF(ifSpec *config.UplinkInterfaceSpec, ifState *con
445445
vrfs = append(vrfs, vrfID)
446446
}
447447

448-
// Configure addresses to enable ipv4 & ipv6 on the tap
449-
for _, addr := range ifState.Addresses {
450-
if addr.IP.IsLinkLocalUnicast() && !common.IsFullyQualified(addr.IPNet) && common.IsV6Cidr(addr.IPNet) {
451-
log.Infof("Not adding address %s to data interface (vpp requires /128 link-local)", addr.String())
452-
continue
453-
} else {
454-
log.Infof("Adding address %s to tap interface", addr.String())
455-
}
456-
// to max len cidr because we don't want the rest of the subnet to be considered as
457-
// connected to that interface
458-
// note that the role of these addresses is just to tell vpp to accept ip4 / ip6 packets on the tap
459-
// we use these addresses as the safest option, because as they are configured on linux, linux
460-
// will never send us packets with these addresses as destination
461-
err = v.vpp.AddInterfaceAddress(tapSwIfIndex, common.ToMaxLenCIDR(addr.IP))
462-
if err != nil {
463-
log.Errorf("Error adding address to tap interface: %v", err)
464-
}
465-
}
466448
return vrfs, nil
467449
}
468450

0 commit comments

Comments
 (0)