mac: Support Apple M1 chips

See https://open5gs.org/open5gs/docs/platform/05-macosx-apple-silicon/
This commit is contained in:
Sukchan Lee
2021-02-06 00:13:48 -05:00
parent 950c4c0a12
commit 7901a1164f
17 changed files with 622 additions and 361 deletions

View File

@@ -17,6 +17,7 @@ if [ "$SYSTEM" = "Linux" ]; then
ip link set ogstun up
else
sysctl -w net.inet.ip.forwarding=1
sysctl -w net.inet6.ip6.forwarding=1
ifconfig lo0 alias 127.0.0.2 netmask 255.255.255.255
ifconfig lo0 alias 127.0.0.3 netmask 255.255.255.255
ifconfig lo0 alias 127.0.0.4 netmask 255.255.255.255
@@ -39,6 +40,7 @@ else
if [ "$SYSTEM" = "Darwin" ]; then
if ! test -f /etc/pf.anchors/org.open5gs; then
sudo sh -c "echo 'nat on {en0} from 10.45.0.0/16 to any -> {en0}' > /etc/pf.anchors/org.open5gs"
sudo sh -c "echo 'nat on {en0} from cafe::1/64 to any -> {en0}' > /etc/pf.anchors/org.open5gs"
fi
pfctl -e -f /etc/pf.anchors/org.open5gs
fi