Skip to content

Commit

Permalink
fix: crash in UI when VXLAN underlay is unknown, fixes #39
Browse files Browse the repository at this point in the history
Signed-off-by: thediveo <[email protected]>
  • Loading branch information
thediveo committed Feb 1, 2024
1 parent e7018f5 commit 5e4223e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions webui/src/models/gw/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,12 @@ export const fromjson = (jsondata: JSONObject) => {
// this VXLAN is the overlay, resolve our underlay reference,
// and then backlink the underlay to us (the overlay).
nif.underlay = nifmap[(jnif.vxlan as JSONObject).idref as string]
if (!nif.underlay.overlays) {
nif.underlay.overlays = []
if (nif.underlay) {
if (!nif.underlay.overlays) {
nif.underlay.overlays = []
}
nif.underlay.overlays.push(nif)
}
nif.underlay.overlays.push(nif)
}
// TAP/TUNs don't reference other network interfaces, but processes
// ... but hey. we need to resolve this relation, too!
Expand Down

0 comments on commit 5e4223e

Please sign in to comment.