Skip to content

Commit bb4aa89

Browse files
committed
vpp-manager: Add static neighbor for LL address on tap0
This patch adds a static neighbor for the node's LinkLocal address on tap0. This simplify things as we know the node's link local in advance and use it for other purposes, so we save a resolution. Also we do not yet support it changing. Finally if we do not have this, we learn the neighbor through gratuitous requests from linux to ND proxy and NS/ND, but as we do not have a glean toward linux, we cannot learn the neighbor if packets are coming from the uplink without prior linux initiated sollicits. As an example DHCPv6 sollicts replies need forwarding and we might have forgotten the neighbor by then. Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
1 parent d099083 commit bb4aa89

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

vpp-manager/vpp_runner.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,18 @@ func (v *VppRunner) configureIPv6LinkLocal(ifSpec *config.UplinkInterfaceSpec, i
224224
ifSpec.InterfaceName, *config.GetCalicoVppDebug().FetchV6LLntries)
225225

226226
found:
227+
err := v.vpp.AddNeighbor(&types.Neighbor{
228+
SwIfIndex: ifState.TapSwIfIndex,
229+
IP: ifState.IPv6LinkLocal.IP,
230+
HardwareAddr: ifState.HardwareAddr,
231+
Flags: types.IPNeighborStatic,
232+
})
233+
if err != nil {
234+
return errors.Wrapf(err, "error add static neighbor for %s tap0 %d", ifState.IPv6LinkLocal.IP, ifState.TapSwIfIndex)
235+
}
227236
// Add LL /128 route to punt table so that punted link-local traffic
228237
// reaches the host via tap instead of hitting fe80::/10 → ip6-link-local.
229-
err := v.vpp.RouteAdd(&types.Route{
238+
err = v.vpp.RouteAdd(&types.Route{
230239
Table: common.PuntTableID,
231240
Dst: common.FullyQualified(ifState.IPv6LinkLocal.IP),
232241
Paths: []types.RoutePath{{

0 commit comments

Comments
 (0)