Skip to content

router: AddLinkType does not acquire the DataPlane mutex #4282

@jcp19

Description

@jcp19

Unlike all other AddX methods such as AddInternalInterface, AddExternalInterface, and AddNeighborIA, the method AddLinkType does not acquire the DataPlane mutex and does not return modifyExisting if it is already running. Is this something that was overlooked?

scion/router/dataplane.go

Lines 241 to 250 in 780bf4c

func (d *DataPlane) AddLinkType(ifID uint16, linkTo topology.LinkType) error {
if _, exists := d.linkTypes[ifID]; exists {
return serrors.WithCtx(alreadySet, "ifID", ifID)
}
if d.linkTypes == nil {
d.linkTypes = make(map[uint16]topology.LinkType)
}
d.linkTypes[ifID] = linkTo
return nil
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions