Skip to content

Commit ea03352

Browse files
hedibouattoursknat
authored andcommitted
fix ifState.IPv6LinkLocal.IPNet check crashing with a nil value
1 parent 1415970 commit ea03352

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vpp-manager/vpp_runner.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func (v *VppRunner) configurePunt(tapSwIfIndex uint32, ifState config.LinuxInter
157157
return errors.Wrapf(err, "error adding vpp side routes for interface")
158158
}
159159
}
160-
if ifState.IPv6LinkLocal.IP != nil {
160+
if ifState.IPv6LinkLocal.IPNet != nil {
161161
err = v.vpp.RouteAdd(&types.Route{
162162
Table: common.PuntTableID,
163163
Dst: common.FullyQualified(ifState.IPv6LinkLocal.IP),
@@ -642,7 +642,7 @@ func (v *VppRunner) configureVppUplinkInterface(
642642
}
643643
}
644644

645-
if ifState.IPv6LinkLocal.IP != nil {
645+
if ifState.IPv6LinkLocal.IPNet != nil {
646646
err = v.vpp.AddInterfaceAddress(ifSpec.SwIfIndex, common.FullyQualified(ifState.IPv6LinkLocal.IP))
647647
if err != nil {
648648
log.Errorf("Error adding address to uplink interface: %v", err)

0 commit comments

Comments
 (0)