From 9ebeb98c9d871eee2e17da3808d130c7595bfe37 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Fri, 16 Feb 2024 16:48:23 +0100 Subject: [PATCH] systemd: network: Avoid assigning IP addr from UE IP pool to ogstun interface When running the open5gs package with systemd network config, the 1st IP address of the UE pool configured in open5gs-upfd config file for ogstun was being assigned to the interface. This causes routing problems when traffic from the UE which was assigned that same IP address is routed to/from the ogstun interface. As a result, every time that open5gs-upfd systemd service was restarted, the following changed had to be applied: ip addr del 10.45.0.1/16 dev ogstun ip route add 10.45.0.0/16 dev ogstun The IP address was set in order to get the routing entry for free. Instead, it should only add the routing entry. Related: https://osmocom.org/issues/6361 --- configs/systemd/99-open5gs.network | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/configs/systemd/99-open5gs.network b/configs/systemd/99-open5gs.network index eed7ce116c..86bea8a1fa 100644 --- a/configs/systemd/99-open5gs.network +++ b/configs/systemd/99-open5gs.network @@ -1,9 +1,13 @@ [Match] Name=ogstun -[Network] -Address=10.45.0.1/16 -Address=2001:db8:cafe::1/48 +[Route] +Gateway=0.0.0.0 +Destination=10.45.0.0/16 + +[Route] +Gateway=:: +Destination=2001:db8:cafe::0/48 [Link] MTUBytes=1400