mirror of
				https://github.com/open5gs/open5gs.git
				synced 2025-11-03 21:43:25 +00:00 
			
		
		
		
	Compare commits
	
		
			166 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					27b87c1110 | ||
| 
						 | 
					fc53fb4beb | ||
| 
						 | 
					4f7bb847a9 | ||
| 
						 | 
					5a85be09d6 | ||
| 
						 | 
					07a61018b2 | ||
| 
						 | 
					74bbc6ecbf | ||
| 
						 | 
					d7e23b7f6a | ||
| 
						 | 
					1a691e1d4a | ||
| 
						 | 
					561f1ac2f3 | ||
| 
						 | 
					a5a5c424c1 | ||
| 
						 | 
					aab8286401 | ||
| 
						 | 
					6ae9ecc697 | ||
| 
						 | 
					b18cf1bce8 | ||
| 
						 | 
					758cf9dd72 | ||
| 
						 | 
					448e07d5a9 | ||
| 
						 | 
					00a296a1de | ||
| 
						 | 
					4f8c34c7aa | ||
| 
						 | 
					acd67c7aa6 | ||
| 
						 | 
					d8655e07c6 | ||
| 
						 | 
					83aac49fd0 | ||
| 
						 | 
					ffc15a7d3d | ||
| 
						 | 
					0ae2743d4b | ||
| 
						 | 
					7bcb3eed98 | ||
| 
						 | 
					fc8c807da2 | ||
| 
						 | 
					d919b2744c | ||
| 
						 | 
					6a6f214785 | ||
| 
						 | 
					bfa34be222 | ||
| 
						 | 
					0fb8279e36 | ||
| 
						 | 
					0ea2142ba6 | ||
| 
						 | 
					562b7ef7de | ||
| 
						 | 
					1df6c072ed | ||
| 
						 | 
					7567659a29 | ||
| 
						 | 
					abd0589eb3 | ||
| 
						 | 
					0d2c07361e | ||
| 
						 | 
					0e5f438cdc | ||
| 
						 | 
					5d234cb108 | ||
| 
						 | 
					42c9dce2b7 | ||
| 
						 | 
					13bba81227 | ||
| 
						 | 
					608c08373d | ||
| 
						 | 
					c0f6955250 | ||
| 
						 | 
					7d9a651f6c | ||
| 
						 | 
					489b633e08 | ||
| 
						 | 
					9ba4b317d2 | ||
| 
						 | 
					b35febd9c4 | ||
| 
						 | 
					f05accc7f3 | ||
| 
						 | 
					7db0c039a1 | ||
| 
						 | 
					35f4cf8deb | ||
| 
						 | 
					ec7735d447 | ||
| 
						 | 
					b600ab5724 | ||
| 
						 | 
					3cb2808ebf | ||
| 
						 | 
					013b4dc8e9 | ||
| 
						 | 
					5e016937c7 | ||
| 
						 | 
					13f1b390ae | ||
| 
						 | 
					7dcde91057 | ||
| 
						 | 
					127685f908 | ||
| 
						 | 
					9e4a791c2b | ||
| 
						 | 
					9c589ac584 | ||
| 
						 | 
					e730530f7b | ||
| 
						 | 
					1354947164 | ||
| 
						 | 
					233db575ea | ||
| 
						 | 
					e2fe15d2ae | ||
| 
						 | 
					7615869c94 | ||
| 
						 | 
					77955d01f8 | ||
| 
						 | 
					5234001b0a | ||
| 
						 | 
					fa67341263 | ||
| 
						 | 
					a797578b60 | ||
| 
						 | 
					1c07e4c6b2 | ||
| 
						 | 
					ab7f565dd6 | ||
| 
						 | 
					5af66be7b5 | ||
| 
						 | 
					ced4a6f945 | ||
| 
						 | 
					72c5f80f26 | ||
| 
						 | 
					3564fe5c8c | ||
| 
						 | 
					e5594a57b9 | ||
| 
						 | 
					af5b3aa931 | ||
| 
						 | 
					831b29973f | ||
| 
						 | 
					68edcd6438 | ||
| 
						 | 
					e9dbe5a3d7 | ||
| 
						 | 
					7e5a5d7511 | ||
| 
						 | 
					acb4db5dd1 | ||
| 
						 | 
					3e7d2398a2 | ||
| 
						 | 
					c6b13be92a | ||
| 
						 | 
					0db09f5c25 | ||
| 
						 | 
					bd6eea4fa5 | ||
| 
						 | 
					e1c79647e2 | ||
| 
						 | 
					362393d0ff | ||
| 
						 | 
					0c1a3d7f95 | ||
| 
						 | 
					eb9b780449 | ||
| 
						 | 
					039b9d0aaa | ||
| 
						 | 
					1326fc85dc | ||
| 
						 | 
					4667b99c92 | ||
| 
						 | 
					7cfeb2e9f9 | ||
| 
						 | 
					005cd30e02 | ||
| 
						 | 
					dde0785375 | ||
| 
						 | 
					16f8d5fa49 | ||
| 
						 | 
					e71a158ed7 | ||
| 
						 | 
					c918b4b5b6 | ||
| 
						 | 
					2471b1b53d | ||
| 
						 | 
					f278d58a69 | ||
| 
						 | 
					2aaa8200c2 | ||
| 
						 | 
					65e96dd75c | ||
| 
						 | 
					ec377a8849 | ||
| 
						 | 
					bedd05e654 | ||
| 
						 | 
					8959c787bc | ||
| 
						 | 
					f728e5da89 | ||
| 
						 | 
					442e7d44e7 | ||
| 
						 | 
					e1e3f254e2 | ||
| 
						 | 
					997554bbb7 | ||
| 
						 | 
					38ff2dc6f7 | ||
| 
						 | 
					a396ea8fc1 | ||
| 
						 | 
					7f774884ea | ||
| 
						 | 
					50f403279a | ||
| 
						 | 
					00c96a3f0f | ||
| 
						 | 
					4537142929 | ||
| 
						 | 
					e0869104c6 | ||
| 
						 | 
					c48f107520 | ||
| 
						 | 
					780f829962 | ||
| 
						 | 
					449b5b484f | ||
| 
						 | 
					d9b5c29a9b | ||
| 
						 | 
					9e664a744b | ||
| 
						 | 
					a252fae84f | ||
| 
						 | 
					47c9f4e4a0 | ||
| 
						 | 
					e31a8474b2 | ||
| 
						 | 
					774e1b0ebd | ||
| 
						 | 
					ac37e00b42 | ||
| 
						 | 
					118d62d42d | ||
| 
						 | 
					80a9497afd | ||
| 
						 | 
					ef07ccfb88 | ||
| 
						 | 
					5d460b0577 | ||
| 
						 | 
					8dab1852cc | ||
| 
						 | 
					899c121478 | ||
| 
						 | 
					fe89f7cd11 | ||
| 
						 | 
					611986794b | ||
| 
						 | 
					caa73e1f5e | ||
| 
						 | 
					4d6692d8fe | ||
| 
						 | 
					64508c2e5c | ||
| 
						 | 
					35d5b7e16e | ||
| 
						 | 
					3d11b87127 | ||
| 
						 | 
					873cf398c7 | ||
| 
						 | 
					dfaf2f1567 | ||
| 
						 | 
					b6a030d82b | ||
| 
						 | 
					3df75e37df | ||
| 
						 | 
					f861919507 | ||
| 
						 | 
					257f398a11 | ||
| 
						 | 
					4a1ddb6650 | ||
| 
						 | 
					496b5a9e58 | ||
| 
						 | 
					916bf752b4 | ||
| 
						 | 
					26f14ee7ca | ||
| 
						 | 
					ff4695bd5a | ||
| 
						 | 
					3b19190f56 | ||
| 
						 | 
					5ea9b22209 | ||
| 
						 | 
					b0e8dbb31a | ||
| 
						 | 
					018b352985 | ||
| 
						 | 
					1dc692753a | ||
| 
						 | 
					182a61dc0b | ||
| 
						 | 
					dc870cc839 | ||
| 
						 | 
					9a814ceac9 | ||
| 
						 | 
					b4c1987ede | ||
| 
						 | 
					ab93fb7613 | ||
| 
						 | 
					6cc84b69ce | ||
| 
						 | 
					8ca9402d11 | ||
| 
						 | 
					5901582281 | ||
| 
						 | 
					e5a0dfb444 | ||
| 
						 | 
					0b063a57c8 | ||
| 
						 | 
					cea1dff5a1 | ||
| 
						 | 
					002e3c7ae9 | ||
| 
						 | 
					27b25b8993 | 
							
								
								
									
										65
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										65
									
								
								README.md
									
									
									
									
									
								
							@@ -1,50 +1,71 @@
 | 
			
		||||
<h2 align="center">Supporting Open5GS</h2>
 | 
			
		||||
<h1 align="center">Open5GS</h1>
 | 
			
		||||
 | 
			
		||||
If you find Open5GS useful for work, please consider supporting this Open Source project by [Becoming a sponsor](https://github.com/sponsors/acetcom). To manage the funding transactions transparently, you can donate through [OpenCollective](https://opencollective.com/open5gs).
 | 
			
		||||
 | 
			
		||||
<h3 align="center">Special Sponsor</h3>
 | 
			
		||||
<h3 align="center">Gold Sponsors</h3>
 | 
			
		||||
<table>
 | 
			
		||||
  <tbody>
 | 
			
		||||
    <tr>
 | 
			
		||||
      <td align="center" valign="middle">
 | 
			
		||||
  <a href="https://nextepc.com/" target="_blank">
 | 
			
		||||
    <img width="260px" src="https://open5gs.org/assets/img/nextepc_logo.jpg">
 | 
			
		||||
  </a>
 | 
			
		||||
      </td>
 | 
			
		||||
      <td width="20px"></td>
 | 
			
		||||
      <td align="center" valign="middle">
 | 
			
		||||
  <a href="https://sdr.eee.strath.ac.uk/" target="_blank">
 | 
			
		||||
    <img width="260px" src="https://open5gs.org/assets/img/strath.png">
 | 
			
		||||
  <a href="http://wavemobile.com/" target="_blank">
 | 
			
		||||
    <img width="260px" src="https://open5gs.org/assets/img/Wavemobile-Logo-Mark-RGB.png">
 | 
			
		||||
  </a>
 | 
			
		||||
      </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
  </tbody>
 | 
			
		||||
</table>
 | 
			
		||||
 | 
			
		||||
<h3 align="center">Sponsors</h3>
 | 
			
		||||
<h3 align="center">Silver Sponsors</h3>
 | 
			
		||||
<table>
 | 
			
		||||
  <tbody>
 | 
			
		||||
    <tr>
 | 
			
		||||
      <td align="center" valign="middle">
 | 
			
		||||
      <td align="center" valign="middle" width="222px">
 | 
			
		||||
        <a href="https://www.auctionsoftware.com/" target="_blank">
 | 
			
		||||
          <img width="222px" src="https://open5gs.org/assets/img/asLogonew.png">
 | 
			
		||||
          <img src="https://open5gs.org/assets/img/asLogonew.png">
 | 
			
		||||
        </a>
 | 
			
		||||
      </td>
 | 
			
		||||
      <td align="center" valign="middle">
 | 
			
		||||
      <td align="center" valign="middle" width="222px">
 | 
			
		||||
        <a href="https://nextepc.com/" target="_blank">
 | 
			
		||||
          <img src="https://open5gs.org/assets/img/nextepc_logo.jpg">
 | 
			
		||||
        </a>
 | 
			
		||||
      </td>
 | 
			
		||||
      <td align="center" valign="middle" width="222px">
 | 
			
		||||
        <a href="https://www.wearetriple.com/" target="_blank">
 | 
			
		||||
          <img width="222px" src="https://open5gs.org/assets/img/triple_logo.png">
 | 
			
		||||
        </a>
 | 
			
		||||
      </td>
 | 
			
		||||
      <td align="center" valign="middle">
 | 
			
		||||
        <a href="https://www.accessparks.com/" target="_blank">
 | 
			
		||||
          <img width="222px" src="https://open5gs.org/assets/img/AccessParks.png">
 | 
			
		||||
          <img src="https://open5gs.org/assets/img/triple_logo.png">
 | 
			
		||||
        </a>
 | 
			
		||||
      </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
      <td align="center" valign="middle">
 | 
			
		||||
      <td align="center" valign="middle" width="222px">
 | 
			
		||||
        <a href="https://sdr.eee.strath.ac.uk/" target="_blank">
 | 
			
		||||
          <img src="https://open5gs.org/assets/img/strath.png">
 | 
			
		||||
        </a>
 | 
			
		||||
      </td>
 | 
			
		||||
      <td align="center" valign="middle" width="222px">
 | 
			
		||||
        <a href="https://skylarkwireless.com/" target="_blank">
 | 
			
		||||
          <img width="222px" src="https://open5gs.org/assets/img/SkylarkWireless-420x78-Web2-R.png">
 | 
			
		||||
          <img src="https://open5gs.org/assets/img/SkylarkWireless-420x78-Web2-R.png">
 | 
			
		||||
        </a>
 | 
			
		||||
      </td>
 | 
			
		||||
      <td align="center" valign="middle" width="222px">
 | 
			
		||||
        <a href="https://sysmocom.de/" target="_blank">
 | 
			
		||||
          <img src="https://open5gs.org/assets/img/sysmocom-logo-only.png">
 | 
			
		||||
        </a>
 | 
			
		||||
      </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
      <td align="center" valign="middle" width="222px">
 | 
			
		||||
        <a href="https://www.p1sec.com/" target="_blank">
 | 
			
		||||
          <img src="https://open5gs.org/assets/img/2021-logo-P1.svg">
 | 
			
		||||
        </a>
 | 
			
		||||
      </td>
 | 
			
		||||
      <td align="center" valign="middle" width="222px">
 | 
			
		||||
        <a href="https://www.ng-voice.com/" target="_blank">
 | 
			
		||||
          <img src="https://open5gs.org/assets/img/ng-voice-logo_color.png">
 | 
			
		||||
        </a>
 | 
			
		||||
      </td>
 | 
			
		||||
      <td align="center" valign="middle" width="222px">
 | 
			
		||||
        <a href="https://www.peratonlabs.com/" target="_blank">
 | 
			
		||||
          <img src="https://open5gs.org/assets/img/peraton-labs-logo-full-color.png">
 | 
			
		||||
        </a>
 | 
			
		||||
      </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
 
 | 
			
		||||
@@ -11,6 +11,7 @@ parameter:
 | 
			
		||||
#    no_udm: true
 | 
			
		||||
#    no_pcf: true
 | 
			
		||||
#    no_nssf: true
 | 
			
		||||
#    no_bsf: true
 | 
			
		||||
#    no_udr: true
 | 
			
		||||
#    no_mme: true
 | 
			
		||||
#    no_sgwc: true
 | 
			
		||||
@@ -23,6 +24,7 @@ mme:
 | 
			
		||||
      identity: mme.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.2
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -31,7 +33,7 @@ mme:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: hss.localdomain
 | 
			
		||||
          addr: 127.0.0.8
 | 
			
		||||
@@ -89,6 +91,7 @@ smf:
 | 
			
		||||
      identity: smf.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.4
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -97,7 +100,7 @@ smf:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: pcrf.localdomain
 | 
			
		||||
          addr: 127.0.0.9
 | 
			
		||||
@@ -152,6 +155,7 @@ hss:
 | 
			
		||||
      identity: hss.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.8
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -160,7 +164,7 @@ hss:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: mme.localdomain
 | 
			
		||||
          addr: 127.0.0.2
 | 
			
		||||
@@ -169,6 +173,7 @@ pcrf:
 | 
			
		||||
      identity: pcrf.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.9
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -177,7 +182,7 @@ pcrf:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: smf.localdomain
 | 
			
		||||
          addr: 127.0.0.4
 | 
			
		||||
@@ -214,6 +219,11 @@ nssf:
 | 
			
		||||
        s_nssai:
 | 
			
		||||
          sst: 1
 | 
			
		||||
 | 
			
		||||
bsf:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.15
 | 
			
		||||
        port: 7777
 | 
			
		||||
 | 
			
		||||
udr:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.20
 | 
			
		||||
 
 | 
			
		||||
@@ -11,6 +11,7 @@ parameter:
 | 
			
		||||
#    no_udm: true
 | 
			
		||||
#    no_pcf: true
 | 
			
		||||
#    no_nssf: true
 | 
			
		||||
#    no_bsf: true
 | 
			
		||||
#    no_udr: true
 | 
			
		||||
#    no_mme: true
 | 
			
		||||
#    no_sgwc: true
 | 
			
		||||
@@ -23,6 +24,7 @@ mme:
 | 
			
		||||
      identity: mme.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.2
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -31,7 +33,7 @@ mme:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: hss.localdomain
 | 
			
		||||
          addr: 127.0.0.8
 | 
			
		||||
@@ -123,6 +125,7 @@ smf:
 | 
			
		||||
      identity: smf.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.4
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -131,7 +134,7 @@ smf:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: pcrf.localdomain
 | 
			
		||||
          addr: 127.0.0.9
 | 
			
		||||
@@ -186,6 +189,7 @@ hss:
 | 
			
		||||
      identity: hss.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.8
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -194,7 +198,7 @@ hss:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: mme.localdomain
 | 
			
		||||
          addr: 127.0.0.2
 | 
			
		||||
@@ -203,6 +207,7 @@ pcrf:
 | 
			
		||||
      identity: pcrf.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.9
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -211,7 +216,7 @@ pcrf:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: smf.localdomain
 | 
			
		||||
          addr: 127.0.0.4
 | 
			
		||||
@@ -248,6 +253,11 @@ nssf:
 | 
			
		||||
        s_nssai:
 | 
			
		||||
          sst: 1
 | 
			
		||||
 | 
			
		||||
bsf:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.15
 | 
			
		||||
        port: 7777
 | 
			
		||||
 | 
			
		||||
udr:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.20
 | 
			
		||||
 
 | 
			
		||||
@@ -175,6 +175,7 @@ TLS_CA = "@sysconfdir@/freeDiameter/cacert.pem";
 | 
			
		||||
# exchanges.
 | 
			
		||||
# Default: Relaying is enabled.
 | 
			
		||||
#NoRelay;
 | 
			
		||||
NoRelay;
 | 
			
		||||
 | 
			
		||||
# Number of server threads that can handle incoming messages at the same time.
 | 
			
		||||
# Default: 4
 | 
			
		||||
 
 | 
			
		||||
@@ -175,6 +175,7 @@ TLS_CA = "@sysconfdir@/freeDiameter/cacert.pem";
 | 
			
		||||
# exchanges.
 | 
			
		||||
# Default: Relaying is enabled.
 | 
			
		||||
#NoRelay;
 | 
			
		||||
NoRelay;
 | 
			
		||||
 | 
			
		||||
# Number of server threads that can handle incoming messages at the same time.
 | 
			
		||||
# Default: 4
 | 
			
		||||
 
 | 
			
		||||
@@ -175,6 +175,7 @@ TLS_CA = "@sysconfdir@/freeDiameter/cacert.pem";
 | 
			
		||||
# exchanges.
 | 
			
		||||
# Default: Relaying is enabled.
 | 
			
		||||
#NoRelay;
 | 
			
		||||
NoRelay;
 | 
			
		||||
 | 
			
		||||
# Number of server threads that can handle incoming messages at the same time.
 | 
			
		||||
# Default: 4
 | 
			
		||||
 
 | 
			
		||||
@@ -175,6 +175,7 @@ TLS_CA = "@sysconfdir@/freeDiameter/cacert.pem";
 | 
			
		||||
# exchanges.
 | 
			
		||||
# Default: Relaying is enabled.
 | 
			
		||||
#NoRelay;
 | 
			
		||||
NoRelay;
 | 
			
		||||
 | 
			
		||||
# Number of server threads that can handle incoming messages at the same time.
 | 
			
		||||
# Default: 4
 | 
			
		||||
 
 | 
			
		||||
@@ -27,12 +27,6 @@ freediameter_extensions_builddir = join_paths(
 | 
			
		||||
conf_data.set('freediameter_extensions_builddir',
 | 
			
		||||
        freediameter_extensions_builddir)
 | 
			
		||||
 | 
			
		||||
if host_system == 'linux'
 | 
			
		||||
    conf_data.set('loopback_devname', 'lo')
 | 
			
		||||
else
 | 
			
		||||
    conf_data.set('loopback_devname', 'lo0')
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
example_conf = '''
 | 
			
		||||
    sample.yaml
 | 
			
		||||
    310014.yaml
 | 
			
		||||
@@ -41,7 +35,7 @@ example_conf = '''
 | 
			
		||||
    vonr.yaml
 | 
			
		||||
    slice.yaml
 | 
			
		||||
    srslte.yaml
 | 
			
		||||
    sample.yaml
 | 
			
		||||
    non3gpp.yaml
 | 
			
		||||
'''.split()
 | 
			
		||||
 | 
			
		||||
foreach file : example_conf
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										233
									
								
								configs/non3gpp.yaml.in
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										233
									
								
								configs/non3gpp.yaml.in
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,233 @@
 | 
			
		||||
db_uri: mongodb://localhost/open5gs
 | 
			
		||||
 | 
			
		||||
logger:
 | 
			
		||||
 | 
			
		||||
parameter:
 | 
			
		||||
#    no_nrf: true
 | 
			
		||||
#    no_amf: true
 | 
			
		||||
#    no_smf: true
 | 
			
		||||
#    no_upf: true
 | 
			
		||||
#    no_ausf: true
 | 
			
		||||
#    no_udm: true
 | 
			
		||||
#    no_pcf: true
 | 
			
		||||
#    no_nssf: true
 | 
			
		||||
#    no_bsf: true
 | 
			
		||||
#    no_udr: true
 | 
			
		||||
#    no_mme: true
 | 
			
		||||
#    no_sgwc: true
 | 
			
		||||
#    no_sgwu: true
 | 
			
		||||
#    no_pcrf: true
 | 
			
		||||
#    no_hss: true
 | 
			
		||||
 | 
			
		||||
mme:
 | 
			
		||||
    freeDiameter:
 | 
			
		||||
      identity: mme.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.2
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_rfc5777.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_mip6i.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: hss.localdomain
 | 
			
		||||
          addr: 127.0.0.8
 | 
			
		||||
 | 
			
		||||
    s1ap:
 | 
			
		||||
      - addr: 127.0.0.2
 | 
			
		||||
    gtpc:
 | 
			
		||||
      - addr: 127.0.0.2
 | 
			
		||||
    gummei:
 | 
			
		||||
      plmn_id:
 | 
			
		||||
        mcc: 901
 | 
			
		||||
        mnc: 70
 | 
			
		||||
      mme_gid: 2
 | 
			
		||||
      mme_code: 1
 | 
			
		||||
    tai:
 | 
			
		||||
      plmn_id:
 | 
			
		||||
        mcc: 901
 | 
			
		||||
        mnc: 70
 | 
			
		||||
      tac: 1
 | 
			
		||||
    security:
 | 
			
		||||
        integrity_order : [ EIA2, EIA1, EIA0 ]
 | 
			
		||||
        ciphering_order : [ EEA0, EEA1, EEA2 ]
 | 
			
		||||
 | 
			
		||||
    network_name:
 | 
			
		||||
        full: Open5GS
 | 
			
		||||
 | 
			
		||||
sgwc:
 | 
			
		||||
    gtpc:
 | 
			
		||||
      - addr: 127.0.0.3
 | 
			
		||||
    pfcp:
 | 
			
		||||
      - addr: 127.0.0.3
 | 
			
		||||
 | 
			
		||||
smf:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.4
 | 
			
		||||
        port: 7777
 | 
			
		||||
    pfcp:
 | 
			
		||||
      - addr: 127.0.0.4
 | 
			
		||||
    gtpc:
 | 
			
		||||
      - addr: 127.0.0.4
 | 
			
		||||
      - addr: ::1
 | 
			
		||||
    gtpu:
 | 
			
		||||
      - addr: 127.0.0.4
 | 
			
		||||
      - addr: ::1
 | 
			
		||||
    subnet:
 | 
			
		||||
      - addr: 10.45.0.1/16
 | 
			
		||||
      - addr: 2001:230:cafe::1/48
 | 
			
		||||
    dns:
 | 
			
		||||
      - 8.8.8.8
 | 
			
		||||
      - 8.8.4.4
 | 
			
		||||
      - 2001:4860:4860::8888
 | 
			
		||||
      - 2001:4860:4860::8844
 | 
			
		||||
    mtu: 1400
 | 
			
		||||
    freeDiameter:
 | 
			
		||||
      identity: smf.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.4
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_rfc5777.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_mip6i.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: pcrf.localdomain
 | 
			
		||||
          addr: 127.0.0.9
 | 
			
		||||
        - identity: aaa.localdomain
 | 
			
		||||
          addr: 127.0.0.1
 | 
			
		||||
amf:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.5
 | 
			
		||||
        port: 7777
 | 
			
		||||
    ngap:
 | 
			
		||||
      - addr: 127.0.0.5
 | 
			
		||||
    guami:
 | 
			
		||||
      - plmn_id:
 | 
			
		||||
          mcc: 901
 | 
			
		||||
          mnc: 70
 | 
			
		||||
        amf_id:
 | 
			
		||||
          region: 2
 | 
			
		||||
          set: 1
 | 
			
		||||
    tai:
 | 
			
		||||
      - plmn_id:
 | 
			
		||||
          mcc: 901
 | 
			
		||||
          mnc: 70
 | 
			
		||||
        tac: 1
 | 
			
		||||
    plmn_support:
 | 
			
		||||
      - plmn_id:
 | 
			
		||||
          mcc: 901
 | 
			
		||||
          mnc: 70
 | 
			
		||||
        s_nssai:
 | 
			
		||||
          - sst: 1
 | 
			
		||||
    security:
 | 
			
		||||
        integrity_order : [ NIA2, NIA1, NIA0 ]
 | 
			
		||||
        ciphering_order : [ NEA0, NEA1, NEA2 ]
 | 
			
		||||
    network_name:
 | 
			
		||||
        full: Open5GS
 | 
			
		||||
    amf_name: open5gs-amf0
 | 
			
		||||
 | 
			
		||||
sgwu:
 | 
			
		||||
    pfcp:
 | 
			
		||||
      - addr: 127.0.0.6
 | 
			
		||||
    gtpu:
 | 
			
		||||
      - addr: 127.0.0.6
 | 
			
		||||
 | 
			
		||||
upf:
 | 
			
		||||
    pfcp:
 | 
			
		||||
      - addr: 127.0.0.7
 | 
			
		||||
    gtpu:
 | 
			
		||||
      - addr: 127.0.0.7
 | 
			
		||||
    subnet:
 | 
			
		||||
      - addr: 10.45.0.1/16
 | 
			
		||||
      - addr: 2001:230:cafe::1/48
 | 
			
		||||
 | 
			
		||||
hss:
 | 
			
		||||
    freeDiameter:
 | 
			
		||||
      identity: hss.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.8
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_rfc5777.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_mip6i.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: mme.localdomain
 | 
			
		||||
          addr: 127.0.0.2
 | 
			
		||||
        - identity: aaa.localdomain
 | 
			
		||||
          addr: 127.0.0.1
 | 
			
		||||
pcrf:
 | 
			
		||||
    freeDiameter:
 | 
			
		||||
      identity: pcrf.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.9
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_rfc5777.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_mip6i.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: smf.localdomain
 | 
			
		||||
          addr: 127.0.0.4
 | 
			
		||||
 | 
			
		||||
nrf:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr:
 | 
			
		||||
        - 127.0.0.10
 | 
			
		||||
        - ::1
 | 
			
		||||
        port: 7777
 | 
			
		||||
 | 
			
		||||
ausf:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.11
 | 
			
		||||
        port: 7777
 | 
			
		||||
 | 
			
		||||
udm:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.12
 | 
			
		||||
        port: 7777
 | 
			
		||||
 | 
			
		||||
pcf:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.13
 | 
			
		||||
        port: 7777
 | 
			
		||||
 | 
			
		||||
nssf:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.14
 | 
			
		||||
        port: 7777
 | 
			
		||||
    nsi:
 | 
			
		||||
      - addr: ::1
 | 
			
		||||
        port: 7777
 | 
			
		||||
        s_nssai:
 | 
			
		||||
          sst: 1
 | 
			
		||||
bsf:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.15
 | 
			
		||||
        port: 7777
 | 
			
		||||
 | 
			
		||||
udr:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.20
 | 
			
		||||
        port: 7777
 | 
			
		||||
@@ -224,13 +224,13 @@ amf:
 | 
			
		||||
#          pem: nrf.pem
 | 
			
		||||
#      - name: nrf.open5gs.org
 | 
			
		||||
#
 | 
			
		||||
#  o SBI Client(http://[fe80::1%@loopback_devname@]:80)
 | 
			
		||||
#  o SBI Client(http://[fd69:f21d:873c:fa::1]:80)
 | 
			
		||||
#    If prefer_ipv4 is true, http://127.0.0.10:80 is selected.
 | 
			
		||||
#
 | 
			
		||||
#    sbi:
 | 
			
		||||
#      addr:
 | 
			
		||||
#        - 127.0.0.10
 | 
			
		||||
#        - fe80::1%@loopback_devname@
 | 
			
		||||
#        - fd69:f21d:873c:fa::1
 | 
			
		||||
#
 | 
			
		||||
nrf:
 | 
			
		||||
    sbi:
 | 
			
		||||
 
 | 
			
		||||
@@ -96,13 +96,13 @@ ausf:
 | 
			
		||||
#          pem: nrf.pem
 | 
			
		||||
#      - name: nrf.open5gs.org
 | 
			
		||||
#
 | 
			
		||||
#  o SBI Client(http://[fe80::1%@loopback_devname@]:80)
 | 
			
		||||
#  o SBI Client(http://[fd69:f21d:873c:fa::1]:80)
 | 
			
		||||
#    If prefer_ipv4 is true, http://127.0.0.10:80 is selected.
 | 
			
		||||
#
 | 
			
		||||
#    sbi:
 | 
			
		||||
#      addr:
 | 
			
		||||
#        - 127.0.0.10
 | 
			
		||||
#        - fe80::1%@loopback_devname@
 | 
			
		||||
#        - fd69:f21d:873c:fa::1
 | 
			
		||||
#
 | 
			
		||||
nrf:
 | 
			
		||||
    sbi:
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										186
									
								
								configs/open5gs/bsf.yaml.in
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										186
									
								
								configs/open5gs/bsf.yaml.in
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,186 @@
 | 
			
		||||
db_uri: mongodb://localhost/open5gs
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# logger:
 | 
			
		||||
#
 | 
			
		||||
#  o Set OGS_LOG_INFO to all domain level
 | 
			
		||||
#   - If `level` is omitted, the default level is OGS_LOG_INFO)
 | 
			
		||||
#   - If `domain` is omitted, the all domain level is set from 'level'
 | 
			
		||||
#    (Nothing is needed)
 | 
			
		||||
#
 | 
			
		||||
#  o Set OGS_LOG_ERROR to all domain level
 | 
			
		||||
#   - `level` can be set with none, fatal, error, warn, info, debug, trace
 | 
			
		||||
#    level: error
 | 
			
		||||
#
 | 
			
		||||
#  o Set OGS_LOG_DEBUG to mme/emm domain level
 | 
			
		||||
#    level: debug
 | 
			
		||||
#    domain: mme,emm
 | 
			
		||||
#
 | 
			
		||||
#  o Set OGS_LOG_TRACE to all domain level
 | 
			
		||||
#    level: trace
 | 
			
		||||
#    domain: core,sbi,bsf,event,tlv,mem,sock
 | 
			
		||||
#
 | 
			
		||||
logger:
 | 
			
		||||
    file: @localstatedir@/log/open5gs/bsf.log
 | 
			
		||||
#
 | 
			
		||||
# bsf:
 | 
			
		||||
#
 | 
			
		||||
#  <SBI Server>
 | 
			
		||||
#
 | 
			
		||||
#  o SBI Server(http://<all address available>:80)
 | 
			
		||||
#    sbi:
 | 
			
		||||
#
 | 
			
		||||
#  o SBI Server(http://<any address>:80)
 | 
			
		||||
#    sbi:
 | 
			
		||||
#      - addr:
 | 
			
		||||
#          - 0.0.0.0
 | 
			
		||||
#          - ::0
 | 
			
		||||
#        port: 7777
 | 
			
		||||
#
 | 
			
		||||
#  o SBI Server(https://<all address avaiable>:443)
 | 
			
		||||
#    sbi:
 | 
			
		||||
#      - tls:
 | 
			
		||||
#          key: bsf.key
 | 
			
		||||
#          pem: bsf.pem
 | 
			
		||||
#
 | 
			
		||||
#  o SBI Server(https://127.0.0.15:443, http://[::1]:80)
 | 
			
		||||
#    sbi:
 | 
			
		||||
#      - addr: 127.0.0.15
 | 
			
		||||
#        tls:
 | 
			
		||||
#          key: bsf.key
 | 
			
		||||
#          pem: bsf.pem
 | 
			
		||||
#      - addr: ::1
 | 
			
		||||
#
 | 
			
		||||
#  o SBI Server(http://bsf.open5gs.org:80)
 | 
			
		||||
#    sbi:
 | 
			
		||||
#      - name: bsf.open5gs.org
 | 
			
		||||
#
 | 
			
		||||
#  o SBI Server(http://127.0.0.15:7777)
 | 
			
		||||
#    sbi:
 | 
			
		||||
#      - addr: 127.0.0.15
 | 
			
		||||
#        port: 7777
 | 
			
		||||
#
 | 
			
		||||
#  o SBI Server(http://<eth0 IP address>:80)
 | 
			
		||||
#    sbi:
 | 
			
		||||
#      - dev: eth0
 | 
			
		||||
#
 | 
			
		||||
#  o Provide custom SBI address to be advertised to NRF
 | 
			
		||||
#    sbi:
 | 
			
		||||
#      - dev: eth0
 | 
			
		||||
#        advertise: open5gs-bsf.svc.local
 | 
			
		||||
#
 | 
			
		||||
#    sbi:
 | 
			
		||||
#      - addr: localhost
 | 
			
		||||
#        advertise:
 | 
			
		||||
#          - 127.0.0.99
 | 
			
		||||
#          - ::1
 | 
			
		||||
#
 | 
			
		||||
bsf:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.15
 | 
			
		||||
        port: 7777
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# nrf:
 | 
			
		||||
#
 | 
			
		||||
#  <SBI Client>>
 | 
			
		||||
#
 | 
			
		||||
#  o SBI Client(http://127.0.0.10:7777)
 | 
			
		||||
#    sbi:
 | 
			
		||||
#      addr: 127.0.0.10
 | 
			
		||||
#      port: 7777
 | 
			
		||||
#
 | 
			
		||||
#  o SBI Client(https://127.0.0.10:443, http://nrf.open5gs.org:80)
 | 
			
		||||
#    sbi:
 | 
			
		||||
#      - addr: 127.0.0.10
 | 
			
		||||
#        tls:
 | 
			
		||||
#          key: nrf.key
 | 
			
		||||
#          pem: nrf.pem
 | 
			
		||||
#      - name: nrf.open5gs.org
 | 
			
		||||
#
 | 
			
		||||
#  o SBI Client(http://[fd69:f21d:873c:fa::1]:80)
 | 
			
		||||
#    If prefer_ipv4 is true, http://127.0.0.10:80 is selected.
 | 
			
		||||
#
 | 
			
		||||
#    sbi:
 | 
			
		||||
#      addr:
 | 
			
		||||
#        - 127.0.0.10
 | 
			
		||||
#        - fd69:f21d:873c:fa::1
 | 
			
		||||
#
 | 
			
		||||
nrf:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr:
 | 
			
		||||
          - 127.0.0.10
 | 
			
		||||
          - ::1
 | 
			
		||||
        port: 7777
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# parameter:
 | 
			
		||||
#
 | 
			
		||||
#  o Number of output streams per SCTP associations.
 | 
			
		||||
#      sctp_streams: 30
 | 
			
		||||
#
 | 
			
		||||
#  o Disable use of IPv4 addresses (only IPv6)
 | 
			
		||||
#      no_ipv4: true
 | 
			
		||||
#
 | 
			
		||||
#  o Disable use of IPv6 addresses (only IPv4)
 | 
			
		||||
#      no_ipv6: true
 | 
			
		||||
#
 | 
			
		||||
#  o Prefer IPv4 instead of IPv6 for estabishing new GTP connections.
 | 
			
		||||
#      prefer_ipv4: true
 | 
			
		||||
#
 | 
			
		||||
parameter:
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# max:
 | 
			
		||||
#
 | 
			
		||||
# o Maximum Number of UE per AMF/MME
 | 
			
		||||
#    ue: 1024
 | 
			
		||||
# o Maximum Number of gNB/eNB per AMF/MME
 | 
			
		||||
#    gnb: 32
 | 
			
		||||
#
 | 
			
		||||
max:
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# pool:
 | 
			
		||||
#
 | 
			
		||||
# o The default memory pool size was set assuming 1024 UEs.
 | 
			
		||||
#   To connect more UEs, you need to increase the size further.
 | 
			
		||||
#
 | 
			
		||||
#   - Pool-size 128         => 65536 Number
 | 
			
		||||
#   - Pool-size 256         => 16384 Number
 | 
			
		||||
#   - Pool-size 512         => 4096 Number
 | 
			
		||||
#   - Pool-size 1024        => 1024 Number
 | 
			
		||||
#   - Pool-size 2048        => 512 Number
 | 
			
		||||
#   - Pool-size 8192        => 128 Number
 | 
			
		||||
#   - Pool-size 1024*1024   => 8 Number
 | 
			
		||||
#
 | 
			
		||||
#    128:  65536
 | 
			
		||||
#    256:  16384
 | 
			
		||||
#    512:  4096
 | 
			
		||||
#    1024: 1024
 | 
			
		||||
#    2048: 512
 | 
			
		||||
#    8192: 128
 | 
			
		||||
#    big:  8
 | 
			
		||||
#
 | 
			
		||||
pool:
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# time:
 | 
			
		||||
#
 | 
			
		||||
#  o NF Instance Heartbeat (Default : 0)
 | 
			
		||||
#    NFs will not send heart-beat timer in NFProfile
 | 
			
		||||
#    NRF will send heart-beat timer in NFProfile
 | 
			
		||||
#
 | 
			
		||||
#  o NF Instance Heartbeat (20 seconds)
 | 
			
		||||
#    NFs will send heart-beat timer (20 seconds) in NFProfile
 | 
			
		||||
#    NRF can change heart-beat timer in NFProfile
 | 
			
		||||
#
 | 
			
		||||
#    nf_instance:
 | 
			
		||||
#      heartbeat: 20
 | 
			
		||||
#
 | 
			
		||||
#  o Message Wait Duration (Default : 10,000 ms = 10 seconds)
 | 
			
		||||
#
 | 
			
		||||
#  o Message Wait Duration (3000 ms)
 | 
			
		||||
#    message:
 | 
			
		||||
#        duration: 3000
 | 
			
		||||
time:
 | 
			
		||||
@@ -34,6 +34,7 @@ open5gs_conf = '''
 | 
			
		||||
    udr.yaml
 | 
			
		||||
    pcf.yaml
 | 
			
		||||
    nssf.yaml
 | 
			
		||||
    bsf.yaml
 | 
			
		||||
'''.split()
 | 
			
		||||
 | 
			
		||||
foreach file : open5gs_conf
 | 
			
		||||
 
 | 
			
		||||
@@ -113,7 +113,7 @@ logger:
 | 
			
		||||
#            lac: 43692
 | 
			
		||||
#      - addr
 | 
			
		||||
#         - 127.0.0.4
 | 
			
		||||
#         - fe80::2%@loopback_devname@
 | 
			
		||||
#         - fd69:f21d:873c:fa::2
 | 
			
		||||
#        map:
 | 
			
		||||
#          tai:
 | 
			
		||||
#            plmn_id:
 | 
			
		||||
@@ -237,25 +237,25 @@ mme:
 | 
			
		||||
#  o Specify SGW addresses the GTP-C must connect to
 | 
			
		||||
#
 | 
			
		||||
#  o One SGW is defined.
 | 
			
		||||
#    If prefer_ipv4 is not true, [fe80::2%@loopback_devname@] is selected.
 | 
			
		||||
#    If prefer_ipv4 is not true, [fd69:f21d:873c:fa::2] is selected.
 | 
			
		||||
#    gtpc:
 | 
			
		||||
#      addr:
 | 
			
		||||
#        - 127.0.0.3
 | 
			
		||||
#        - fe80::2%@loopback_devname@
 | 
			
		||||
#        - fd69:f21d:873c:fa::2
 | 
			
		||||
#
 | 
			
		||||
#  o Two SGW are defined. MME selects SGW with round-robin manner per UE
 | 
			
		||||
#    gtpc:
 | 
			
		||||
#      - addr: 127.0.0.3
 | 
			
		||||
#      - addr: fe80::2%@loopback_devname@
 | 
			
		||||
#      - addr: fd69:f21d:873c:fa::2
 | 
			
		||||
#
 | 
			
		||||
#  o Three SGW are defined. MME selects SGW with round-robin manner per UE
 | 
			
		||||
#    gtpc:
 | 
			
		||||
#      - addr
 | 
			
		||||
#        - 127.0.0.3
 | 
			
		||||
#        - fe80::2%@loopback_devname@
 | 
			
		||||
#        - fd69:f21d:873c:fa::2
 | 
			
		||||
#      - addr
 | 
			
		||||
#        - 127.0.0.22
 | 
			
		||||
#        - fe80::12%@loopback_devname@
 | 
			
		||||
#        - fd69:f21d:873c:fa::12
 | 
			
		||||
#      - name: sgw3.open5gs.org
 | 
			
		||||
#
 | 
			
		||||
# <SGW Selection Mode>
 | 
			
		||||
@@ -300,17 +300,17 @@ sgwc:
 | 
			
		||||
#      you can use a specific SMF node for each UE.
 | 
			
		||||
#
 | 
			
		||||
#  o Two SMF are defined. 127.0.0.4:2123 is used.
 | 
			
		||||
#    [fe80::3%@loopback_devname@]:2123 is ignored.
 | 
			
		||||
#    [fd69:f21d:873c:fa::3]:2123 is ignored.
 | 
			
		||||
#    gtpc:
 | 
			
		||||
#      - addr: 127.0.0.4
 | 
			
		||||
#      - addr: fe80::3%@loopback_devname@
 | 
			
		||||
#      - addr: fd69:f21d:873c:fa::3
 | 
			
		||||
#
 | 
			
		||||
#  o One SMF is defined. if prefer_ipv4 is not true,
 | 
			
		||||
#    [fe80::3%@loopback_devname@] is selected.
 | 
			
		||||
#    [fd69:f21d:873c:fa::3] is selected.
 | 
			
		||||
#    gtpc:
 | 
			
		||||
#      - addr:
 | 
			
		||||
#        - 127.0.0.4
 | 
			
		||||
#        - fe80::3%@loopback_devname@
 | 
			
		||||
#        - fd69:f21d:873c:fa::3
 | 
			
		||||
#
 | 
			
		||||
#  o Two SMF are defined with a different APN.
 | 
			
		||||
#    - Note that if SMF IP for UE is configured in HSS,
 | 
			
		||||
 
 | 
			
		||||
@@ -138,13 +138,13 @@ nssf:
 | 
			
		||||
#          pem: nrf.pem
 | 
			
		||||
#      - name: nrf.open5gs.org
 | 
			
		||||
#
 | 
			
		||||
#  o SBI Client(http://[fe80::1%@loopback_devname@]:80)
 | 
			
		||||
#  o SBI Client(http://[fd69:f21d:873c:fa::1]:80)
 | 
			
		||||
#    If prefer_ipv4 is true, http://127.0.0.10:80 is selected.
 | 
			
		||||
#
 | 
			
		||||
#    sbi:
 | 
			
		||||
#      addr:
 | 
			
		||||
#        - 127.0.0.10
 | 
			
		||||
#        - fe80::1%@loopback_devname@
 | 
			
		||||
#        - fd69:f21d:873c:fa::1
 | 
			
		||||
#
 | 
			
		||||
nrf:
 | 
			
		||||
    sbi:
 | 
			
		||||
 
 | 
			
		||||
@@ -98,13 +98,13 @@ pcf:
 | 
			
		||||
#          pem: nrf.pem
 | 
			
		||||
#      - name: nrf.open5gs.org
 | 
			
		||||
#
 | 
			
		||||
#  o SBI Client(http://[fe80::1%@loopback_devname@]:80)
 | 
			
		||||
#  o SBI Client(http://[fd69:f21d:873c:fa::1]:80)
 | 
			
		||||
#    If prefer_ipv4 is true, http://127.0.0.10:80 is selected.
 | 
			
		||||
#
 | 
			
		||||
#    sbi:
 | 
			
		||||
#      addr:
 | 
			
		||||
#        - 127.0.0.10
 | 
			
		||||
#        - fe80::1%@loopback_devname@
 | 
			
		||||
#        - fd69:f21d:873c:fa::1
 | 
			
		||||
#
 | 
			
		||||
nrf:
 | 
			
		||||
    sbi:
 | 
			
		||||
 
 | 
			
		||||
@@ -41,7 +41,8 @@ pcrf:
 | 
			
		||||
#      prefer_ipv4: true
 | 
			
		||||
#
 | 
			
		||||
#  o Legacy support for pre-release LTE 11 devices to do calling
 | 
			
		||||
#    - Replace IPv4/v6 local addr field in AAR Media-Subcomponent AVP by any
 | 
			
		||||
#    - Replace IPv4/v6 local addr field in AAR Media-Subcomponent AVP
 | 
			
		||||
#      by 'any local port'
 | 
			
		||||
#      no_ipv4v6_local_addr_in_packet_filter: true
 | 
			
		||||
#
 | 
			
		||||
parameter:
 | 
			
		||||
 
 | 
			
		||||
@@ -26,17 +26,17 @@ logger:
 | 
			
		||||
#
 | 
			
		||||
#  <GTP-C Server>
 | 
			
		||||
#
 | 
			
		||||
#  o GTP-C Server(127.0.0.3:2123, [fe80::2%@loopback_devname@]:2123)
 | 
			
		||||
#  o GTP-C Server(127.0.0.3:2123, [fd69:f21d:873c:fa::2]:2123)
 | 
			
		||||
#    gtpc:
 | 
			
		||||
#      addr:
 | 
			
		||||
#        - 127.0.0.3
 | 
			
		||||
#        - fe80::2%@loopback_devname@
 | 
			
		||||
#        - fd69:f21d:873c:fa::2
 | 
			
		||||
#
 | 
			
		||||
#  o On SGW, Same Configuration(127.0.0.3:2123,
 | 
			
		||||
#  [fe80::2%@loopback_devname@]:2123) as below.
 | 
			
		||||
#  [fd69:f21d:873c:fa::2]:2123) as below.
 | 
			
		||||
#    gtpc:
 | 
			
		||||
#      - addr: 127.0.0.3
 | 
			
		||||
#      - addr: fe80::2%@loopback_devname@
 | 
			
		||||
#      - addr: fd69:f21d:873c:fa::2
 | 
			
		||||
#
 | 
			
		||||
#  <PFCP Server>
 | 
			
		||||
#
 | 
			
		||||
 
 | 
			
		||||
@@ -86,17 +86,17 @@ logger:
 | 
			
		||||
#
 | 
			
		||||
#  <GTP-C Server>
 | 
			
		||||
#
 | 
			
		||||
#  o GTP-C Server(127.0.0.4:2123, [fe80::3%@loopback_devname@]:2123)
 | 
			
		||||
#  o GTP-C Server(127.0.0.4:2123, [fd69:f21d:873c:fa::3]:2123)
 | 
			
		||||
#    gtpc:
 | 
			
		||||
#      addr:
 | 
			
		||||
#        - 127.0.0.4
 | 
			
		||||
#        - fe80::3%@loopback_devname@
 | 
			
		||||
#        - fd69:f21d:873c:fa::3
 | 
			
		||||
#
 | 
			
		||||
#  o On SMF, Same configuration
 | 
			
		||||
#    (127.0.0.4:2123, [fe80::3%@loopback_devname@]:2123).
 | 
			
		||||
#    (127.0.0.4:2123, [fd69:f21d:873c:fa::3]:2123).
 | 
			
		||||
#    gtpc:
 | 
			
		||||
#      - addr: 127.0.0.4
 | 
			
		||||
#      - addr: fe80::3%@loopback_devname@
 | 
			
		||||
#      - addr: fd69:f21d:873c:fa::3
 | 
			
		||||
#
 | 
			
		||||
#  <GTP-U Server>>
 | 
			
		||||
#
 | 
			
		||||
@@ -122,6 +122,7 @@ logger:
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
#  o Specific DNN/APN(e.g 'ims') uses 10.46.0.1/16, 2001:230:babe::1/48
 | 
			
		||||
#    ; If the UE has unknown DNN/APN(not internet/ims), SMF/UPF will crash.
 | 
			
		||||
#
 | 
			
		||||
#    subnet:
 | 
			
		||||
#      - addr: 10.45.0.1/16
 | 
			
		||||
@@ -133,6 +134,16 @@ logger:
 | 
			
		||||
#      - addr: 2001:230:babe::1/48
 | 
			
		||||
#        dnn: ims
 | 
			
		||||
#
 | 
			
		||||
#  o Specific DNN/APN with the FALLBACK SUBNET(10.47.0.1/16)
 | 
			
		||||
#    ; Note that put the FALLBACK SUBNET last to avoid SMF/UPF crash.
 | 
			
		||||
#
 | 
			
		||||
#    subnet:
 | 
			
		||||
#      - addr: 10.45.0.1/16
 | 
			
		||||
#        dnn: internet
 | 
			
		||||
#      - addr: 10.46.0.1/16
 | 
			
		||||
#        dnn: ims
 | 
			
		||||
#      - addr: 10.50.0.1/16 ## FALLBACK SUBNET
 | 
			
		||||
#
 | 
			
		||||
#  o Pool Range Sample
 | 
			
		||||
#    subnet:
 | 
			
		||||
#      - addr: 10.45.0.1/24
 | 
			
		||||
@@ -358,13 +369,13 @@ smf:
 | 
			
		||||
#          pem: nrf.pem
 | 
			
		||||
#      - name: nrf.open5gs.org
 | 
			
		||||
#
 | 
			
		||||
#  o SBI Client(http://[fe80::1%@loopback_devname@]:80)
 | 
			
		||||
#  o SBI Client(http://[fd69:f21d:873c:fa::1]:80)
 | 
			
		||||
#    If prefer_ipv4 is true, http://127.0.0.10:80 is selected.
 | 
			
		||||
#
 | 
			
		||||
#    sbi:
 | 
			
		||||
#      addr:
 | 
			
		||||
#        - 127.0.0.10
 | 
			
		||||
#        - fe80::1%@loopback_devname@
 | 
			
		||||
#        - fd69:f21d:873c:fa::1
 | 
			
		||||
#
 | 
			
		||||
nrf:
 | 
			
		||||
    sbi:
 | 
			
		||||
 
 | 
			
		||||
@@ -96,13 +96,13 @@ udm:
 | 
			
		||||
#          pem: nrf.pem
 | 
			
		||||
#      - name: nrf.open5gs.org
 | 
			
		||||
#
 | 
			
		||||
#  o SBI Client(http://[fe80::1%@loopback_devname@]:80)
 | 
			
		||||
#  o SBI Client(http://[fd69:f21d:873c:fa::1]:80)
 | 
			
		||||
#    If prefer_ipv4 is true, http://127.0.0.10:80 is selected.
 | 
			
		||||
#
 | 
			
		||||
#    sbi:
 | 
			
		||||
#      addr:
 | 
			
		||||
#        - 127.0.0.10
 | 
			
		||||
#        - fe80::1%@loopback_devname@
 | 
			
		||||
#        - fd69:f21d:873c:fa::1
 | 
			
		||||
#
 | 
			
		||||
nrf:
 | 
			
		||||
    sbi:
 | 
			
		||||
 
 | 
			
		||||
@@ -98,13 +98,13 @@ udr:
 | 
			
		||||
#          pem: nrf.pem
 | 
			
		||||
#      - name: nrf.open5gs.org
 | 
			
		||||
#
 | 
			
		||||
#  o SBI Client(http://[fe80::1%@loopback_devname@]:80)
 | 
			
		||||
#  o SBI Client(http://[fd69:f21d:873c:fa::1]:80)
 | 
			
		||||
#    If prefer_ipv4 is true, http://127.0.0.10:80 is selected.
 | 
			
		||||
#
 | 
			
		||||
#    sbi:
 | 
			
		||||
#      addr:
 | 
			
		||||
#        - 127.0.0.10
 | 
			
		||||
#        - fe80::1%@loopback_devname@
 | 
			
		||||
#        - fd69:f21d:873c:fa::1
 | 
			
		||||
#
 | 
			
		||||
nrf:
 | 
			
		||||
    sbi:
 | 
			
		||||
 
 | 
			
		||||
@@ -107,6 +107,8 @@ logger:
 | 
			
		||||
#    $ sudo ip addr add 2001:230:cafe::1/48 dev ogstun
 | 
			
		||||
#    $ sudo ip addr add 2001:230:babe::1/48 dev ogstun
 | 
			
		||||
#
 | 
			
		||||
#    ; If the UE has unknown DNN/APN(not internet/ims), SMF/UPF will crash.
 | 
			
		||||
#
 | 
			
		||||
#    subnet:
 | 
			
		||||
#      - addr: 10.45.0.1/16
 | 
			
		||||
#        dnn: internet
 | 
			
		||||
@@ -117,6 +119,16 @@ logger:
 | 
			
		||||
#      - addr: 2001:230:babe::1/48
 | 
			
		||||
#        dnn: ims
 | 
			
		||||
#
 | 
			
		||||
#  o Specific DNN/APN with the FALLBACK SUBNET(10.47.0.1/16)
 | 
			
		||||
#    ; Note that put the FALLBACK SUBNET last to avoid SMF/UPF crash.
 | 
			
		||||
#
 | 
			
		||||
#    subnet:
 | 
			
		||||
#      - addr: 10.45.0.1/16
 | 
			
		||||
#        dnn: internet
 | 
			
		||||
#      - addr: 10.46.0.1/16
 | 
			
		||||
#        dnn: ims
 | 
			
		||||
#      - addr: 10.50.0.1/16 ## FALLBACK SUBNET
 | 
			
		||||
#
 | 
			
		||||
#  o Multiple Devices (default: ogstun)
 | 
			
		||||
#    $ sudo ip addr add 10.45.0.1/16 dev ogstun
 | 
			
		||||
#    $ sudo ip addr add 2001:230:cafe::1/48 dev ogstun2
 | 
			
		||||
 
 | 
			
		||||
@@ -11,6 +11,7 @@ parameter:
 | 
			
		||||
#    no_udm: true
 | 
			
		||||
#    no_pcf: true
 | 
			
		||||
#    no_nssf: true
 | 
			
		||||
#    no_bsf: true
 | 
			
		||||
#    no_udr: true
 | 
			
		||||
#    no_mme: true
 | 
			
		||||
#    no_sgwc: true
 | 
			
		||||
@@ -23,6 +24,7 @@ mme:
 | 
			
		||||
      identity: mme.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.2
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -31,7 +33,7 @@ mme:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: hss.localdomain
 | 
			
		||||
          addr: 127.0.0.8
 | 
			
		||||
@@ -89,6 +91,7 @@ smf:
 | 
			
		||||
      identity: smf.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.4
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -97,7 +100,7 @@ smf:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: pcrf.localdomain
 | 
			
		||||
          addr: 127.0.0.9
 | 
			
		||||
@@ -152,6 +155,7 @@ hss:
 | 
			
		||||
      identity: hss.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.8
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -160,7 +164,7 @@ hss:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: mme.localdomain
 | 
			
		||||
          addr: 127.0.0.2
 | 
			
		||||
@@ -169,6 +173,7 @@ pcrf:
 | 
			
		||||
      identity: pcrf.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.9
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -177,7 +182,7 @@ pcrf:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: smf.localdomain
 | 
			
		||||
          addr: 127.0.0.4
 | 
			
		||||
@@ -213,6 +218,11 @@ nssf:
 | 
			
		||||
        port: 7777
 | 
			
		||||
        s_nssai:
 | 
			
		||||
          sst: 1
 | 
			
		||||
bsf:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.15
 | 
			
		||||
        port: 7777
 | 
			
		||||
 | 
			
		||||
udr:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.20
 | 
			
		||||
 
 | 
			
		||||
@@ -11,6 +11,7 @@ parameter:
 | 
			
		||||
#    no_udm: true
 | 
			
		||||
#    no_pcf: true
 | 
			
		||||
#    no_nssf: true
 | 
			
		||||
#    no_bsf: true
 | 
			
		||||
#    no_udr: true
 | 
			
		||||
#    no_mme: true
 | 
			
		||||
#    no_sgwc: true
 | 
			
		||||
@@ -23,6 +24,7 @@ mme:
 | 
			
		||||
      identity: mme.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.2
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -31,7 +33,7 @@ mme:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: hss.localdomain
 | 
			
		||||
          addr: 127.0.0.8
 | 
			
		||||
@@ -89,6 +91,7 @@ smf:
 | 
			
		||||
      identity: smf.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.4
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -97,7 +100,7 @@ smf:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: pcrf.localdomain
 | 
			
		||||
          addr: 127.0.0.9
 | 
			
		||||
@@ -156,6 +159,7 @@ hss:
 | 
			
		||||
      identity: hss.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.8
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -164,7 +168,7 @@ hss:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: mme.localdomain
 | 
			
		||||
          addr: 127.0.0.2
 | 
			
		||||
@@ -173,6 +177,7 @@ pcrf:
 | 
			
		||||
      identity: pcrf.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.9
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -181,7 +186,7 @@ pcrf:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: smf.localdomain
 | 
			
		||||
          addr: 127.0.0.4
 | 
			
		||||
@@ -228,6 +233,11 @@ nssf:
 | 
			
		||||
          sst: 1
 | 
			
		||||
          sd: 009000
 | 
			
		||||
 | 
			
		||||
bsf:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.15
 | 
			
		||||
        port: 7777
 | 
			
		||||
 | 
			
		||||
udr:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.20
 | 
			
		||||
 
 | 
			
		||||
@@ -11,6 +11,7 @@ parameter:
 | 
			
		||||
#    no_udm: true
 | 
			
		||||
#    no_pcf: true
 | 
			
		||||
#    no_nssf: true
 | 
			
		||||
#    no_bsf: true
 | 
			
		||||
#    no_udr: true
 | 
			
		||||
#    no_mme: true
 | 
			
		||||
#    no_sgwc: true
 | 
			
		||||
@@ -23,6 +24,7 @@ mme:
 | 
			
		||||
      identity: mme.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.2
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -31,7 +33,7 @@ mme:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: hss.localdomain
 | 
			
		||||
          addr: 127.0.0.8
 | 
			
		||||
@@ -89,6 +91,7 @@ smf:
 | 
			
		||||
      identity: smf.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.4
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -97,7 +100,7 @@ smf:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: pcrf.localdomain
 | 
			
		||||
          addr: 127.0.0.9
 | 
			
		||||
@@ -152,6 +155,7 @@ hss:
 | 
			
		||||
      identity: hss.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.8
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -160,7 +164,7 @@ hss:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: mme.localdomain
 | 
			
		||||
          addr: 127.0.0.2
 | 
			
		||||
@@ -169,6 +173,7 @@ pcrf:
 | 
			
		||||
      identity: pcrf.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.9
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -177,7 +182,7 @@ pcrf:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: smf.localdomain
 | 
			
		||||
          addr: 127.0.0.4
 | 
			
		||||
@@ -214,6 +219,11 @@ nssf:
 | 
			
		||||
        s_nssai:
 | 
			
		||||
          sst: 1
 | 
			
		||||
 | 
			
		||||
bsf:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.15
 | 
			
		||||
        port: 7777
 | 
			
		||||
 | 
			
		||||
udr:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.20
 | 
			
		||||
 
 | 
			
		||||
@@ -29,6 +29,7 @@ systemd_conf_in = '''
 | 
			
		||||
    open5gs-udmd.service
 | 
			
		||||
    open5gs-pcfd.service
 | 
			
		||||
    open5gs-nssfd.service
 | 
			
		||||
    open5gs-bsfd.service
 | 
			
		||||
    open5gs-udrd.service
 | 
			
		||||
'''.split()
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										18
									
								
								configs/systemd/open5gs-bsfd.service.in
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								configs/systemd/open5gs-bsfd.service.in
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=Open5GS BSF Daemon
 | 
			
		||||
Wants=mongodb.service mongod.service
 | 
			
		||||
 | 
			
		||||
[Service]
 | 
			
		||||
Type=simple
 | 
			
		||||
 | 
			
		||||
User=open5gs
 | 
			
		||||
Group=open5gs
 | 
			
		||||
 | 
			
		||||
Restart=always
 | 
			
		||||
ExecStart=@bindir@/open5gs-bsfd -c @sysconfdir@/open5gs/bsf.yaml
 | 
			
		||||
RestartSec=2
 | 
			
		||||
RestartPreventExitStatus=1
 | 
			
		||||
ExecReload=/bin/kill -HUP $MAINPID
 | 
			
		||||
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy=multi-user.target
 | 
			
		||||
@@ -11,6 +11,7 @@ parameter:
 | 
			
		||||
#    no_udm: true
 | 
			
		||||
#    no_pcf: true
 | 
			
		||||
#    no_nssf: true
 | 
			
		||||
#    no_bsf: true
 | 
			
		||||
#    no_udr: true
 | 
			
		||||
#    no_mme: true
 | 
			
		||||
#    no_sgwc: true
 | 
			
		||||
@@ -23,6 +24,7 @@ mme:
 | 
			
		||||
      identity: mme.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.2
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -31,7 +33,7 @@ mme:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: hss.localdomain
 | 
			
		||||
          addr: 127.0.0.8
 | 
			
		||||
@@ -92,6 +94,7 @@ smf:
 | 
			
		||||
      identity: smf.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.4
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -100,7 +103,7 @@ smf:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: pcrf.localdomain
 | 
			
		||||
          addr: 127.0.0.9
 | 
			
		||||
@@ -155,6 +158,7 @@ hss:
 | 
			
		||||
      identity: hss.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.8
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -163,7 +167,7 @@ hss:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: mme.localdomain
 | 
			
		||||
          addr: 127.0.0.2
 | 
			
		||||
@@ -174,6 +178,7 @@ pcrf:
 | 
			
		||||
      identity: pcrf.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.9
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -182,7 +187,7 @@ pcrf:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: smf.localdomain
 | 
			
		||||
          addr: 127.0.0.4
 | 
			
		||||
@@ -221,6 +226,11 @@ nssf:
 | 
			
		||||
        s_nssai:
 | 
			
		||||
          sst: 1
 | 
			
		||||
 | 
			
		||||
bsf:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.15
 | 
			
		||||
        port: 7777
 | 
			
		||||
 | 
			
		||||
udr:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.20
 | 
			
		||||
 
 | 
			
		||||
@@ -11,6 +11,7 @@ parameter:
 | 
			
		||||
#    no_udm: true
 | 
			
		||||
#    no_pcf: true
 | 
			
		||||
#    no_nssf: true
 | 
			
		||||
#    no_bsf: true
 | 
			
		||||
#    no_udr: true
 | 
			
		||||
#    no_mme: true
 | 
			
		||||
#    no_sgwc: true
 | 
			
		||||
@@ -23,6 +24,7 @@ mme:
 | 
			
		||||
      identity: mme.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.2
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -31,7 +33,7 @@ mme:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: hss.localdomain
 | 
			
		||||
          addr: 127.0.0.8
 | 
			
		||||
@@ -92,6 +94,7 @@ smf:
 | 
			
		||||
      identity: smf.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.4
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -100,7 +103,7 @@ smf:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: pcrf.localdomain
 | 
			
		||||
          addr: 127.0.0.9
 | 
			
		||||
@@ -155,6 +158,7 @@ hss:
 | 
			
		||||
      identity: hss.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.8
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -163,7 +167,7 @@ hss:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: mme.localdomain
 | 
			
		||||
          addr: 127.0.0.2
 | 
			
		||||
@@ -172,6 +176,7 @@ pcrf:
 | 
			
		||||
      identity: pcrf.localdomain
 | 
			
		||||
      realm: localdomain
 | 
			
		||||
      listen_on: 127.0.0.9
 | 
			
		||||
      no_fwd: true
 | 
			
		||||
      load_extension:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
 | 
			
		||||
          conf: 0x8888
 | 
			
		||||
@@ -180,7 +185,7 @@ pcrf:
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nasreq.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
 | 
			
		||||
        - module: @freediameter_extensions_builddir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
 | 
			
		||||
      connect:
 | 
			
		||||
        - identity: smf.localdomain
 | 
			
		||||
          addr: 127.0.0.4
 | 
			
		||||
@@ -219,6 +224,16 @@ nssf:
 | 
			
		||||
        s_nssai:
 | 
			
		||||
          sst: 1
 | 
			
		||||
 | 
			
		||||
bsf:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.15
 | 
			
		||||
        port: 7777
 | 
			
		||||
 | 
			
		||||
af:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.16
 | 
			
		||||
        port: 7777
 | 
			
		||||
 | 
			
		||||
udr:
 | 
			
		||||
    sbi:
 | 
			
		||||
      - addr: 127.0.0.20
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										228
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										228
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							@@ -1,3 +1,231 @@
 | 
			
		||||
open5gs (2.4.0) unstable; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * VoNR Added
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Sat, 11 Dec 2021 22:21:31 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.4.0~bionic) bionic; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * VoNR added
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Sat, 11 Dec 2021 22:19:42 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.4.0~focal) focal; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * VoNR added
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Sat, 11 Dec 2021 22:18:26 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.4.0~hirsute) hirsute; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * VoNR added
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Sat, 11 Dec 2021 21:22:12 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.6) unstable; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Sat, 16 Oct 2021 22:45:37 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.6~bionic) bionic; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Sat, 16 Oct 2021 22:44:14 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.6~focal) focal; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Sat, 16 Oct 2021 22:43:17 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.6~hirsute) hirsute; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Sat, 16 Oct 2021 22:42:02 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.4) unstable; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Wed, 06 Oct 2021 21:46:16 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.4~hirsute) hirsute; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Wed, 06 Oct 2021 21:44:21 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.4~bionic) bionic; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Wed, 06 Oct 2021 21:43:06 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.4~focal) focal; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Wed, 06 Oct 2021 21:41:20 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.3) unstable; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Sat, 21 Aug 2021 18:20:49 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.3~focal) focal; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Sat, 21 Aug 2021 18:19:35 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.3~bionic) bionic; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Sat, 21 Aug 2021 18:17:53 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.3~hirsute) hirsute; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Sat, 21 Aug 2021 18:16:18 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.2) unstable; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Sun, 18 Jul 2021 20:24:08 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.2~hirsute) hirsute; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Sun, 18 Jul 2021 20:23:04 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.2~bionic) bionic; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Sun, 18 Jul 2021 20:21:54 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.2~focal) focal; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Sun, 18 Jul 2021 20:20:38 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.1) unstable; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Support ePDG Interface
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Tue, 29 Jun 2021 22:12:11 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.1~hirsute) hirsute; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Support ePDG Interface
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Tue, 29 Jun 2021 22:11:04 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.1~bionic) bionic; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Support ePDG Interface
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Tue, 29 Jun 2021 22:10:02 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.1~focal) focal; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Support ePDG Interface
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Tue, 29 Jun 2021 22:08:55 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.0) unstable; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Tue, 08 Jun 2021 21:19:10 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.0~focal) focal; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Tue, 08 Jun 2021 21:18:10 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.0~bionic) bionic; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Tue, 08 Jun 2021 21:16:53 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.3.0~hirsute) hirsute; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Tue, 08 Jun 2021 21:15:17 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.2.9) unstable; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Wed, 19 May 2021 14:12:49 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.2.9~hirsute1) hirsute; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Wed, 19 May 2021 14:11:46 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.2.9~bionic1) bionic; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Wed, 19 May 2021 14:10:51 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.2.9~focal1) focal; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Wed, 19 May 2021 14:09:29 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.2.9~hirsute) hirsute; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Wed, 19 May 2021 14:06:05 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.2.9~bionic) bionic; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Wed, 19 May 2021 13:32:46 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.2.9~focal) focal; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Wed, 19 May 2021 13:31:08 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.2.8) unstable; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Security Protection
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Sun, 09 May 2021 11:23:01 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.2.8~bionic) bionic; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Security Protection
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Sun, 09 May 2021 11:22:02 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.2.8~focal) focal; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Security Protection
 | 
			
		||||
 | 
			
		||||
 -- Sukchan Lee <acetcom@gmail.com>  Sun, 09 May 2021 11:20:13 +0900
 | 
			
		||||
 | 
			
		||||
open5gs (2.2.7) unstable; urgency=medium
 | 
			
		||||
 | 
			
		||||
  * Bug Fixed
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										14
									
								
								debian/control
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								debian/control
									
									
									
									
										vendored
									
									
								
							@@ -20,6 +20,7 @@ Build-Depends: debhelper (>= 11),
 | 
			
		||||
               libmicrohttpd-dev,
 | 
			
		||||
               libcurl4-gnutls-dev,
 | 
			
		||||
               libnghttp2-dev,
 | 
			
		||||
               libtins-dev,
 | 
			
		||||
Standards-Version: 4.3.0
 | 
			
		||||
Rules-Requires-Root: no
 | 
			
		||||
Homepage: https://open5gs.org
 | 
			
		||||
@@ -211,6 +212,18 @@ Description: NSSF (Network Slice Selection Function)
 | 
			
		||||
 .
 | 
			
		||||
 This package provides the NSSF (Network Slice Selection Function)
 | 
			
		||||
 | 
			
		||||
Package: open5gs-bsf
 | 
			
		||||
Architecture: any
 | 
			
		||||
Multi-Arch: same
 | 
			
		||||
Depends: ${shlibs:Depends},
 | 
			
		||||
         ${misc:Depends},
 | 
			
		||||
         open5gs-common (= ${binary:Version})
 | 
			
		||||
Description: BSF (Binding Support Function)
 | 
			
		||||
 Open5GS is a C-language implementation of 5G Core and EPC
 | 
			
		||||
 Packet Core, i.e. the core network of an NR/LTE network (Release-16)
 | 
			
		||||
 .
 | 
			
		||||
 This package provides the BSF (Binding Support Function)
 | 
			
		||||
 | 
			
		||||
Package: open5gs-udr
 | 
			
		||||
Architecture: any
 | 
			
		||||
Multi-Arch: same
 | 
			
		||||
@@ -241,6 +254,7 @@ Depends: ${misc:Depends},
 | 
			
		||||
         open5gs-udm (= ${binary:Version}),
 | 
			
		||||
         open5gs-pcf (= ${binary:Version}),
 | 
			
		||||
         open5gs-nssf (= ${binary:Version}),
 | 
			
		||||
         open5gs-bsf (= ${binary:Version}),
 | 
			
		||||
         open5gs-udr (= ${binary:Version})
 | 
			
		||||
Description: 5G Core and EPC (metapackage)
 | 
			
		||||
 Open5GS is a C-language implementation of 5G Core and EPC
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								debian/open5gs-bsf.install
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								debian/open5gs-bsf.install
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
usr/bin/open5gs-bsfd
 | 
			
		||||
configs/open5gs/bsf.yaml etc/open5gs
 | 
			
		||||
configs/systemd/open5gs-bsfd.service lib/systemd/system
 | 
			
		||||
							
								
								
									
										2
									
								
								debian/open5gs-common.install
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								debian/open5gs-common.install
									
									
									
									
										vendored
									
									
								
							@@ -3,4 +3,4 @@ usr/lib/*/libfd*.so*
 | 
			
		||||
usr/lib/*/freeDiameter/*.fdx
 | 
			
		||||
configs/freeDiameter/cacert.pem /etc/freeDiameter
 | 
			
		||||
configs/logrotate/open5gs /etc/logrotate.d
 | 
			
		||||
#misc/db/open5gs-dbctl /usr/bin
 | 
			
		||||
misc/db/open5gs-dbctl /usr/bin
 | 
			
		||||
 
 | 
			
		||||
@@ -1,76 +1,112 @@
 | 
			
		||||
Docker running example
 | 
			
		||||
===========================================
 | 
			
		||||
* Build Image
 | 
			
		||||
  $ docker-compose build
 | 
			
		||||
  
 | 
			
		||||
  `$ docker-compose build`
 | 
			
		||||
 | 
			
		||||
* Development 
 | 
			
		||||
  $ docker-compose run dev
 | 
			
		||||
  
 | 
			
		||||
  `$ docker-compose run dev`
 | 
			
		||||
 | 
			
		||||
* Runtime
 | 
			
		||||
  ```
 | 
			
		||||
  $ docker-compose \
 | 
			
		||||
    -f docker-compose.yml -f docker-compose.run.yml run run
 | 
			
		||||
  ```
 | 
			
		||||
 | 
			
		||||
* Test
 | 
			
		||||
  ```
 | 
			
		||||
  $ docker-compose \
 | 
			
		||||
    -f docker-compose.yml -f docker-compose.test.yml run test
 | 
			
		||||
  ```
 | 
			
		||||
 | 
			
		||||
* Test(ubuntu:artful)
 | 
			
		||||
  ```
 | 
			
		||||
  $ TAG=eoan docker-compose build
 | 
			
		||||
  $ TAG=eoan docker-compose \
 | 
			
		||||
    -f docker-compose.yml -f docker-compose.test.yml run test
 | 
			
		||||
  ```
 | 
			
		||||
 | 
			
		||||
* Development(fedora:latest)
 | 
			
		||||
  ```
 | 
			
		||||
  $ DIST=fedora docker-compose build
 | 
			
		||||
  $ DIST=fedora docker-compose run dev
 | 
			
		||||
  ```
 | 
			
		||||
 | 
			
		||||
* Runtime(debian:jessie)
 | 
			
		||||
  ```
 | 
			
		||||
  $ DIST=debian TAG=stretch docker-compose build
 | 
			
		||||
  $ DIST=debian TAG=stretch docker-compose 
 | 
			
		||||
    -f docker-compose.yml -f docker-compose.run.yml run run
 | 
			
		||||
  ```
 | 
			
		||||
 | 
			
		||||
* All Test with All Environment
 | 
			
		||||
  $ ./check.sh
 | 
			
		||||
  
 | 
			
		||||
  `$ ./check.sh`
 | 
			
		||||
 | 
			
		||||
* Run WebUI 
 | 
			
		||||
  $ docker-compose up -d
 | 
			
		||||
  
 | 
			
		||||
  `$ docker-compose up -d`
 | 
			
		||||
 | 
			
		||||
For OpenSUSE Build Service Release
 | 
			
		||||
===========================================
 | 
			
		||||
 | 
			
		||||
* Build Package
 | 
			
		||||
  
 | 
			
		||||
  ```
 | 
			
		||||
  $ ./build-aux/git-version-gen . > .tarball-version
 | 
			
		||||
  $ dpkg-source -b .
 | 
			
		||||
  $ rm -f .tarball-version
 | 
			
		||||
  ```
 | 
			
		||||
 | 
			
		||||
* Get Release Key
 | 
			
		||||
  
 | 
			
		||||
  ```
 | 
			
		||||
  $ wget http://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_18.04/Release.key
 | 
			
		||||
  $ sudo apt-key add Release.key
 | 
			
		||||
  ```
 | 
			
		||||
 | 
			
		||||
* Setup Repository
 | 
			
		||||
  ```
 | 
			
		||||
  $ sudo sh -c "echo 'deb https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_18.04/ ./' > /etc/apt/sources.list.d/open5gs-latest.list"
 | 
			
		||||
  $ sudo apt-get update
 | 
			
		||||
  ```
 | 
			
		||||
  
 | 
			
		||||
For Launchpad Release
 | 
			
		||||
===========================================
 | 
			
		||||
 | 
			
		||||
* Run Docker
 | 
			
		||||
  
 | 
			
		||||
  ```
 | 
			
		||||
  $ docker-compose run dev
 | 
			
		||||
  ```
 | 
			
		||||
 | 
			
		||||
* Setup Debian Environment
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
export DEBFULLNAME='Sukchan Lee'
 | 
			
		||||
export DEBEMAIL='acetcom@gmail.com'
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
* Transfer GPG key
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
  $ gpg --export-secret-keys --armor --output private.asc
 | 
			
		||||
  $ gpg --import private.asc
 | 
			
		||||
  $ gpg --export > public.asc
 | 
			
		||||
  $ gpg --import public.asc
 | 
			
		||||
  ```
 | 
			
		||||
 | 
			
		||||
* Version Change
 | 
			
		||||
  
 | 
			
		||||
  ```
 | 
			
		||||
  $ vi meson.build
 | 
			
		||||
  $ ./misc/git-version-gen . > .tarball-version 2>/dev/null
 | 
			
		||||
  ```
 | 
			
		||||
 | 
			
		||||
* Upload OpenBuildService
 | 
			
		||||
  
 | 
			
		||||
  ```
 | 
			
		||||
  $ dch -i
 | 
			
		||||
  $ meson subprojects download freeDiameter
 | 
			
		||||
  $ debuild -S -uc -us -d
 | 
			
		||||
@@ -78,16 +114,25 @@ export DEBEMAIL='acetcom@gmail.com'
 | 
			
		||||
  $ cd home\:acetcom\:open5gs/latest/
 | 
			
		||||
  $ cp ~/git/open5gs_1.0.0.* .
 | 
			
		||||
  $ osc ci -m "Update it"
 | 
			
		||||
  ```
 | 
			
		||||
 | 
			
		||||
* Upload LaunchPad
 | 
			
		||||
  
 | 
			
		||||
  ```
 | 
			
		||||
  $ dch -i
 | 
			
		||||
  $ meson subprojects download freeDiameter
 | 
			
		||||
  $ debuild -S -d
 | 
			
		||||
  $ dput ppa:open5gs/latest *.source.changes
 | 
			
		||||
  ```
 | 
			
		||||
 | 
			
		||||
* Tagging
 | 
			
		||||
  
 | 
			
		||||
  ```
 | 
			
		||||
  $ git tag v1.x.x -a
 | 
			
		||||
  ```
 | 
			
		||||
 | 
			
		||||
* Build package
 | 
			
		||||
  
 | 
			
		||||
  ```
 | 
			
		||||
  $ dpkg-buildpackage -d
 | 
			
		||||
 | 
			
		||||
  ```
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										26
									
								
								docker/alpine/latest/base/Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								docker/alpine/latest/base/Dockerfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,26 @@
 | 
			
		||||
ARG dist=alpine
 | 
			
		||||
ARG tag=latest
 | 
			
		||||
FROM ${dist}:${tag}
 | 
			
		||||
 | 
			
		||||
MAINTAINER Sukchan Lee <acetcom@gmail.com>
 | 
			
		||||
 | 
			
		||||
RUN apk update && \
 | 
			
		||||
    apk add --no-cache \
 | 
			
		||||
        alpine-sdk \
 | 
			
		||||
        bison \
 | 
			
		||||
        flex \
 | 
			
		||||
        git \
 | 
			
		||||
        meson \
 | 
			
		||||
        bash \
 | 
			
		||||
        linux-headers \
 | 
			
		||||
        bsd-compat-headers \
 | 
			
		||||
        yaml-dev \
 | 
			
		||||
        lksctp-tools-dev \
 | 
			
		||||
        gnutls-dev \
 | 
			
		||||
        libgcrypt-dev \
 | 
			
		||||
        libidn-dev \
 | 
			
		||||
        mongo-c-driver-dev \
 | 
			
		||||
        libmicrohttpd-dev \
 | 
			
		||||
        curl-dev \
 | 
			
		||||
        nghttp2-dev \
 | 
			
		||||
        iproute2
 | 
			
		||||
@@ -1,21 +1,19 @@
 | 
			
		||||
ARG dist=centos
 | 
			
		||||
ARG dist=alpine
 | 
			
		||||
ARG tag=latest
 | 
			
		||||
ARG username=acetcom
 | 
			
		||||
FROM ${username}/${dist}-${tag}-open5gs-base
 | 
			
		||||
 | 
			
		||||
MAINTAINER Sukchan Lee <acetcom@gmail.com>
 | 
			
		||||
 | 
			
		||||
RUN yum -y install \
 | 
			
		||||
        cscope \
 | 
			
		||||
        vim \
 | 
			
		||||
        sudo \
 | 
			
		||||
        iputils \
 | 
			
		||||
        net-tools
 | 
			
		||||
 | 
			
		||||
COPY setup.sh /root
 | 
			
		||||
 | 
			
		||||
RUN apk update && \
 | 
			
		||||
    apk add --no-cache \
 | 
			
		||||
        vim \
 | 
			
		||||
        sudo
 | 
			
		||||
 | 
			
		||||
ARG username=acetcom
 | 
			
		||||
RUN useradd -m --uid=1000 ${username} && \
 | 
			
		||||
RUN adduser -u 1000 acetcom -D && \
 | 
			
		||||
    echo "${username} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/${username} && \
 | 
			
		||||
    chmod 0440 /etc/sudoers.d/${username}
 | 
			
		||||
 | 
			
		||||
@@ -1,30 +0,0 @@
 | 
			
		||||
ARG dist=centos
 | 
			
		||||
ARG tag=latest
 | 
			
		||||
FROM ${dist}:${tag}
 | 
			
		||||
 | 
			
		||||
MAINTAINER Sukchan Lee <acetcom@gmail.com>
 | 
			
		||||
 | 
			
		||||
RUN yum -y install epel-release
 | 
			
		||||
#RUN yum -y install https://centos7.iuscommunity.org/ius-release.rpm
 | 
			
		||||
RUN yum -y update
 | 
			
		||||
 | 
			
		||||
RUN yum -y install \
 | 
			
		||||
        python3 \
 | 
			
		||||
        ninja-build \
 | 
			
		||||
        gcc \
 | 
			
		||||
        flex \
 | 
			
		||||
        bison \
 | 
			
		||||
        git \
 | 
			
		||||
        meson \
 | 
			
		||||
        lksctp-tools-devel \
 | 
			
		||||
        libidn-devel \
 | 
			
		||||
        gnutls-devel \
 | 
			
		||||
        libgcrypt-devel \
 | 
			
		||||
        openssl-devel \
 | 
			
		||||
        cyrus-sasl-devel \
 | 
			
		||||
        libyaml-devel \
 | 
			
		||||
        mongo-c-driver-devel \
 | 
			
		||||
        libmicrohttpd-devel \
 | 
			
		||||
        libcurl-devel \
 | 
			
		||||
        libnghttp2-devel \
 | 
			
		||||
        iproute
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
../8/dev
 | 
			
		||||
@@ -1,37 +0,0 @@
 | 
			
		||||
ARG dist=centos
 | 
			
		||||
ARG tag=latest
 | 
			
		||||
FROM ${dist}:${tag}
 | 
			
		||||
 | 
			
		||||
MAINTAINER Sukchan Lee <acetcom@gmail.com>
 | 
			
		||||
 | 
			
		||||
RUN dnf -y install epel-release && \
 | 
			
		||||
        dnf -y install 'dnf-command(config-manager)' && \
 | 
			
		||||
        dnf config-manager --set-enabled PowerTools && \
 | 
			
		||||
        dnf -y update
 | 
			
		||||
 | 
			
		||||
RUN dnf -y install \
 | 
			
		||||
        https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm && \
 | 
			
		||||
        dnf config-manager --set-enabled elrepo-testing && \
 | 
			
		||||
        dnf -y update
 | 
			
		||||
 | 
			
		||||
RUN dnf -y install \
 | 
			
		||||
        python3 \
 | 
			
		||||
        ninja-build \
 | 
			
		||||
        gcc \
 | 
			
		||||
        flex \
 | 
			
		||||
        bison \
 | 
			
		||||
        git \
 | 
			
		||||
        lksctp-tools-devel \
 | 
			
		||||
        libidn-devel \
 | 
			
		||||
        gnutls-devel \
 | 
			
		||||
        libgcrypt-devel \
 | 
			
		||||
        openssl-devel \
 | 
			
		||||
        cyrus-sasl-devel \
 | 
			
		||||
        libyaml-devel \
 | 
			
		||||
        mongo-c-driver-devel \
 | 
			
		||||
        libmicrohttpd-devel \
 | 
			
		||||
        libcurl-devel \
 | 
			
		||||
        libnghttp2-devel \
 | 
			
		||||
        iproute
 | 
			
		||||
 | 
			
		||||
RUN dnf -y install meson
 | 
			
		||||
@@ -9,9 +9,6 @@ TAG=bionic docker-compose -f docker-compose.yml -f docker-compose.test.yml run -
 | 
			
		||||
DIST=fedora TAG=32 docker-compose build
 | 
			
		||||
DIST=fedora TAG=32 docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
 | 
			
		||||
 | 
			
		||||
DIST=centos docker-compose build
 | 
			
		||||
DIST=centos docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
 | 
			
		||||
 | 
			
		||||
DIST=debian docker-compose build
 | 
			
		||||
DIST=debian docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -28,6 +28,7 @@ RUN apt-get update && \
 | 
			
		||||
        libmicrohttpd-dev \
 | 
			
		||||
        libcurl4-gnutls-dev \
 | 
			
		||||
        libnghttp2-dev \
 | 
			
		||||
        libtins-dev \
 | 
			
		||||
        iproute2 \
 | 
			
		||||
        ca-certificates \
 | 
			
		||||
        netbase \
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								docker/debian/sid
									
									
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								docker/debian/sid
									
									
									
									
									
										Symbolic link
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
latest
 | 
			
		||||
							
								
								
									
										1
									
								
								docker/debian/testing
									
									
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								docker/debian/testing
									
									
									
									
									
										Symbolic link
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
latest
 | 
			
		||||
@@ -15,4 +15,4 @@ services:
 | 
			
		||||
    sysctls:
 | 
			
		||||
      - net.ipv6.conf.all.disable_ipv6=0
 | 
			
		||||
    hostname: open5gs-test
 | 
			
		||||
    command: /bin/bash -c "/root/setup.sh; cd open5gs && ninja -C build test"
 | 
			
		||||
    command: /bin/bash -c "/root/setup.sh; cd open5gs/build && meson test -v"
 | 
			
		||||
 
 | 
			
		||||
@@ -8,6 +8,7 @@ RUN dnf -y install \
 | 
			
		||||
        python3 \
 | 
			
		||||
        ninja-build \
 | 
			
		||||
        gcc \
 | 
			
		||||
        gcc-c++ \
 | 
			
		||||
        flex \
 | 
			
		||||
        bison \
 | 
			
		||||
        git \
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								docker/ubuntu/hirsute
									
									
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								docker/ubuntu/hirsute
									
									
									
									
									
										Symbolic link
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
latest
 | 
			
		||||
@@ -28,6 +28,7 @@ RUN apt-get update && \
 | 
			
		||||
        libmicrohttpd-dev \
 | 
			
		||||
        libcurl4-gnutls-dev \
 | 
			
		||||
        libnghttp2-dev \
 | 
			
		||||
        libtins-dev \
 | 
			
		||||
        iproute2 \
 | 
			
		||||
        ca-certificates \
 | 
			
		||||
        netbase \
 | 
			
		||||
 
 | 
			
		||||
@@ -23,12 +23,12 @@ RUN apt-get update && \
 | 
			
		||||
        net-tools && \
 | 
			
		||||
    apt-get clean
 | 
			
		||||
 | 
			
		||||
RUN apt-get update && \
 | 
			
		||||
    apt-get install -y software-properties-common && \
 | 
			
		||||
    sudo add-apt-repository ppa:wireshark-dev/stable -y && \
 | 
			
		||||
    apt-get update && \
 | 
			
		||||
    DEBIAN_FRONTEND=noninteractive \
 | 
			
		||||
    apt-get install -y wireshark
 | 
			
		||||
#RUN apt-get update && \
 | 
			
		||||
#    apt-get install -y software-properties-common && \
 | 
			
		||||
#    sudo add-apt-repository ppa:wireshark-dev/stable -y && \
 | 
			
		||||
#    apt-get update && \
 | 
			
		||||
#    DEBIAN_FRONTEND=noninteractive \
 | 
			
		||||
#    apt-get install -y wireshark
 | 
			
		||||
 | 
			
		||||
COPY setup.sh /root
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -53,6 +53,7 @@ The Open5GS 5G SA Core contains the following functions:
 | 
			
		||||
* UDR - Unified Data Repository
 | 
			
		||||
* PCF - Policy and Charging Function
 | 
			
		||||
* NSSF - Network Slice Selection Function
 | 
			
		||||
* BSF - Binding Support Function
 | 
			
		||||
 | 
			
		||||
The 5G SA core works in a different way to the 4G core - it uses a **Service Based Architecture** (SBI). **Control plane** functions are configured to register with the NRF, and the NRF then helps them discover the other core functions. Running through the other functions: The AMF handles connection and mobility management; a subset of what the 4G MME is tasked with. gNBs (5G basestations) connect to the AMF. The UDM, AUSF and UDR carry out similar operations as the 4G HSS, generating SIM authentication vectors and holding the subscriber profile. Session management is all handled by the SMF (previously the responsibility of the 4G MME/ SGWC/ PGWC). The NSSF provides a way to select the network slice. Finally there is the PCF, used for charging and enforcing subscriber policies.
 | 
			
		||||
 | 
			
		||||
@@ -107,10 +108,9 @@ https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Debian
 | 
			
		||||
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Debian_Unstable/
 | 
			
		||||
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Raspbian_10/
 | 
			
		||||
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_18.04/
 | 
			
		||||
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_19.04/
 | 
			
		||||
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_19.10/
 | 
			
		||||
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_20.04/
 | 
			
		||||
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_20.10/
 | 
			
		||||
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_21.04/
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
#### openSUSE
 | 
			
		||||
@@ -144,10 +144,9 @@ https://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_Test
 | 
			
		||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_Unstable/
 | 
			
		||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/Raspbian_10/
 | 
			
		||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_18.04/
 | 
			
		||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_19.04/
 | 
			
		||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_19.10/
 | 
			
		||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_20.04/
 | 
			
		||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_20.10/
 | 
			
		||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_21.04/
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -164,7 +163,7 @@ The WebUI allows you to interactively edit subscriber data. While it is not esse
 | 
			
		||||
    ```bash
 | 
			
		||||
    $ sudo apt update
 | 
			
		||||
    $ sudo apt install curl
 | 
			
		||||
    $ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
 | 
			
		||||
    $ curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
 | 
			
		||||
    $ sudo apt install nodejs
 | 
			
		||||
    ```
 | 
			
		||||
 | 
			
		||||
@@ -177,7 +176,7 @@ The WebUI allows you to interactively edit subscriber data. While it is not esse
 | 
			
		||||
You can now install WebUI of Open5GS.
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ curl -sL {{ site.url }}{{ site.baseurl }}/assets/webui/install | sudo -E bash -
 | 
			
		||||
$ curl -fsSL {{ site.url }}{{ site.baseurl }}/assets/webui/install | sudo -E bash -
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## 4. Configure Open5GS
 | 
			
		||||
@@ -221,6 +220,7 @@ AUSF-sbi  = 127.0.0.11:7777 for 5G SBI
 | 
			
		||||
UDM-sbi   = 127.0.0.12:7777 for 5G SBI
 | 
			
		||||
PCF-sbi   = 127.0.0.13:7777 for 5G SBI
 | 
			
		||||
NSSF-sbi  = 127.0.0.14:7777 for 5G SBI
 | 
			
		||||
BSF-sbi   = 127.0.0.15:7777 for 5G SBI
 | 
			
		||||
UDR-sbi   = 127.0.0.20:7777 for 5G SBI
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
@@ -467,6 +467,7 @@ $ sudo systemctl stop open5gs-ausfd
 | 
			
		||||
$ sudo systemctl stop open5gs-udmd
 | 
			
		||||
$ sudo systemctl stop open5gs-pcfd
 | 
			
		||||
$ sudo systemctl stop open5gs-nssfd
 | 
			
		||||
$ sudo systemctl stop open5gs-bsfd
 | 
			
		||||
$ sudo systemctl stop open5gs-udrd
 | 
			
		||||
$ sudo systemctl stop open5gs-webui
 | 
			
		||||
```
 | 
			
		||||
@@ -485,6 +486,7 @@ $ sudo systemctl restart open5gs-ausfd
 | 
			
		||||
$ sudo systemctl restart open5gs-udmd
 | 
			
		||||
$ sudo systemctl restart open5gs-pcfd
 | 
			
		||||
$ sudo systemctl restart open5gs-nssfd
 | 
			
		||||
$ sudo systemctl restart open5gs-bsfd
 | 
			
		||||
$ sudo systemctl restart open5gs-udrd
 | 
			
		||||
$ sudo systemctl restart open5gs-webui
 | 
			
		||||
```
 | 
			
		||||
@@ -516,6 +518,6 @@ $ sudo rm -Rf /var/log/open5gs
 | 
			
		||||
The WebUI of Open5GS can be removed as follows:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
curl -sL {{ site.url }}{{ site.baseurl }}/assets/webui/uninstall | sudo -E bash -
 | 
			
		||||
curl -fsSL {{ site.url }}{{ site.baseurl }}/assets/webui/uninstall | sudo -E bash -
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -44,7 +44,7 @@ $ sudo ip link set ogstun up
 | 
			
		||||
Install the dependencies for building the source code.
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ sudo apt install python3-pip python3-setuptools python3-wheel ninja-build build-essential flex bison git libsctp-dev libgnutls28-dev libgcrypt-dev libssl-dev libidn11-dev libmongoc-dev libbson-dev libyaml-dev libnghttp2-dev libmicrohttpd-dev libcurl4-gnutls-dev libnghttp2-dev meson
 | 
			
		||||
$ sudo apt install python3-pip python3-setuptools python3-wheel ninja-build build-essential flex bison git libsctp-dev libgnutls28-dev libgcrypt-dev libssl-dev libidn11-dev libmongoc-dev libbson-dev libyaml-dev libnghttp2-dev libmicrohttpd-dev libcurl4-gnutls-dev libnghttp2-dev libtins-dev meson
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Git clone.
 | 
			
		||||
@@ -329,6 +329,14 @@ Open5GS daemon v2.1.0
 | 
			
		||||
08/21 22:56:02.155: [app] INFO: NSSF initialize...done (../src/nssfd/app.c:31)
 | 
			
		||||
08/21 22:56:02.155: [sbi] INFO: sbi_server() [127.0.0.12]:7777 (../lib/sbi/server.c:298)
 | 
			
		||||
 | 
			
		||||
$ ./install/bin/open5gs-bsfd
 | 
			
		||||
Open5GS daemon v2.1.0
 | 
			
		||||
 | 
			
		||||
08/21 22:56:02.154: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/bsf.yaml' (../src/main.c:54)
 | 
			
		||||
08/21 22:56:02.154: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/bsf.log' (../src/main.c:57)
 | 
			
		||||
08/21 22:56:02.155: [app] INFO: BSF initialize...done (../src/bsf/app.c:31)
 | 
			
		||||
08/21 22:56:02.155: [sbi] INFO: sbi_server() [127.0.0.12]:7777 (../lib/sbi/server.c:298)
 | 
			
		||||
 | 
			
		||||
$ ./install/bin/open5gs-udrd
 | 
			
		||||
Open5GS daemon v2.1.0
 | 
			
		||||
 | 
			
		||||
@@ -375,7 +383,7 @@ $ ./build/tests/app/app ## Both 5G Core and EPC with ./build/configs/sample.yaml
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ sudo apt install curl
 | 
			
		||||
$ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
 | 
			
		||||
$ curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
 | 
			
		||||
$ sudo apt install nodejs
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -35,6 +35,7 @@ AUSF-sbi  = 127.0.0.11:7777 for 5G SBI
 | 
			
		||||
UDM-sbi   = 127.0.0.12:7777 for 5G SBI
 | 
			
		||||
PCF-sbi   = 127.0.0.13:7777 for 5G SBI
 | 
			
		||||
NSSF-sbi   = 127.0.0.14:7777 for 5G SBI
 | 
			
		||||
BSF-sbi   = 127.0.0.15:7777 for 5G SBI
 | 
			
		||||
UDR-sbi   = 127.0.0.20:7777 for 5G SBI
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -10,8 +10,11 @@ If you have tested radio hardware from a vendor not listed with Open5GS, please
 | 
			
		||||
### Commercial 5G
 | 
			
		||||
---
 | 
			
		||||
 * Airspan 5G OpenRange vCU + Airspan 5G OpenRange vDU + Airspan 5G OpenRANGE06 AirVelocity 2700 RU
 | 
			
		||||
 * LIONS RANathon O-CU and O-DU + RANathon RS8601 Indoor O-RU + RANathon XG8600 Fronthaul Gateway
 | 
			
		||||
 * NOKIA AEQE (SW: 5G20A)
 | 
			
		||||
 * NOKIA AEQD (SW: 5G20A)
 | 
			
		||||
 * NOKIA AEQP (SW: 5G21A)
 | 
			
		||||
 * Huawei BTS5900
 | 
			
		||||
 | 
			
		||||
### Commercial 4G
 | 
			
		||||
---
 | 
			
		||||
@@ -25,19 +28,26 @@ If you have tested radio hardware from a vendor not listed with Open5GS, please
 | 
			
		||||
 * Baicells Neutrino
 | 
			
		||||
 * Baicells Nova 243
 | 
			
		||||
 * Baicells Nova 246
 | 
			
		||||
 * Baicells Nova 249
 | 
			
		||||
 * Baicells Nova 436Q
 | 
			
		||||
 * Baicells Nova 227 (EBS & CBRS)
 | 
			
		||||
 * Baicells Nova 233
 | 
			
		||||
 * Ericsson BaseBand 6630 (21Q1 Software)
 | 
			
		||||
 * Ericsson RBS 6601 + DUL 20 01 + RUS 01 B8 
 | 
			
		||||
 * Gemtek WLTGFC-101 (S/W version 2.1.1746.1116)
 | 
			
		||||
 * Huawei BTS 3900 (S/W version V100R011C10SPC230)
 | 
			
		||||
 * NOKIA FW2PC BC28 Flexi Zone G2 Outdoor Micro FDD LTE 700 MHz High Power
 | 
			
		||||
 * NOKIA FWH1 B38 Flexi Zone Outdoor Micro TD LTE 2600 MHz
 | 
			
		||||
 * Huawei BTS3900 (S/W version V100R011C10SPC230)
 | 
			
		||||
 * Huawei BBU5900 with RRU5304W Band 7 FDD 2600Mhz 40W Version V100R016C10
 | 
			
		||||
 * Nokia FW2PC BC28 Flexi Zone G2 Outdoor Micro FDD LTE 700 MHz High Power
 | 
			
		||||
 * Nokia FWH1 B38 Flexi Zone Outdoor Micro TD LTE 2600 MHz
 | 
			
		||||
 * Nokia FRGY Flexi BTS BBU with Nokia FRCG RRU Band 5 850Mhz FDD 40W. Version 16.1A to 19.0
 | 
			
		||||
 * Ruckus Q710 and Q910
 | 
			
		||||
 | 
			
		||||
### 4G/5G Software Stacks + SDRs
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
 * [Amarisoft](https://www.amarisoft.com/) + LimeSDR, USRP, Amarisoft PCI Express Card
 | 
			
		||||
 * [srsLTE / srsENB](https://github.com/srsLTE/srsLTE) + LimeSDR, USRP, BladeRF x40 (BladeRF Not stable)
 | 
			
		||||
 * Open Air Interface 5G ([NR_SA_F1AP_5GRECORDS branch](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/NR_SA_F1AP_5GRECORDS)) + USRP B210
 | 
			
		||||
 | 
			
		||||
### Misc Radio Hardware
 | 
			
		||||
---
 | 
			
		||||
 
 | 
			
		||||
@@ -109,7 +109,7 @@ a base CentOS 8 installation.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ sudo dnf install python3 meson ninja-build gcc flex bison git lksctp-tools-devel libidn-devel gnutls-devel libgcrypt-devel openssl-devel cyrus-sasl-devel libyaml-devel mongo-c-driver-devel libmicrohttpd-devel libcurl-devel libnghttp2-devel
 | 
			
		||||
$ sudo dnf install python3 meson ninja-build gcc gcc-c++ flex bison git lksctp-tools-devel libidn-devel gnutls-devel libgcrypt-devel openssl-devel cyrus-sasl-devel libyaml-devel mongo-c-driver-devel libmicrohttpd-devel libcurl-devel libnghttp2-devel
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Install the SCTP kernel module in kernel-modules-extra.
 | 
			
		||||
@@ -325,7 +325,7 @@ $ cd ../
 | 
			
		||||
$ ls install/bin
 | 
			
		||||
open5gs-amfd   open5gs-hssd  open5gs-nrfd   open5gs-sgwcd  open5gs-smfd  open5gs-udrd
 | 
			
		||||
open5gs-ausfd  open5gs-mmed  open5gs-pcrfd  open5gs-sgwud  open5gs-udmd  open5gs-pcfd
 | 
			
		||||
open5gs-upfd   open5gs-nssfd
 | 
			
		||||
open5gs-upfd   open5gs-nssfd open5gs-bsfd
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Building WebUI of Open5GS
 | 
			
		||||
 
 | 
			
		||||
@@ -70,7 +70,7 @@ $ ip link show
 | 
			
		||||
 | 
			
		||||
Install the depedencies for building the source code.
 | 
			
		||||
```bash
 | 
			
		||||
$ sudo dnf install python3 ninja-build gcc flex bison git lksctp-tools-devel libidn-devel gnutls-devel libgcrypt-devel openssl-devel cyrus-sasl-devel libyaml-devel mongo-c-driver-devel libmicrohttpd-devel libcurl-devel libnghttp2-devel iproute
 | 
			
		||||
$ sudo dnf install python3 ninja-build gcc gcc-c++ flex bison git lksctp-tools-devel libidn-devel gnutls-devel libgcrypt-devel openssl-devel cyrus-sasl-devel libyaml-devel mongo-c-driver-devel libmicrohttpd-devel libcurl-devel libnghttp2-devel iproute
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Install Meson
 | 
			
		||||
 
 | 
			
		||||
@@ -89,7 +89,7 @@ $ sudo pfctl -e -f /etc/pf.anchors/org.open5gs
 | 
			
		||||
 | 
			
		||||
Install the depedencies for building the source code.
 | 
			
		||||
```bash
 | 
			
		||||
$ brew install mongo-c-driver gnutls libgcrypt libidn libyaml libmicrohttpd nghttp2 pkg-config bison libusrsctp
 | 
			
		||||
$ brew install mongo-c-driver gnutls libgcrypt libidn libyaml libmicrohttpd nghttp2 pkg-config bison libusrsctp libtins
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Configure Homebrew PATH
 | 
			
		||||
@@ -97,6 +97,7 @@ Configure Homebrew PATH
 | 
			
		||||
$ export PATH="/opt/homebrew/opt/bison/bin:/opt/homebrew/bin:$PATH"
 | 
			
		||||
$ export LIBRARY_PATH=/opt/homebrew/lib
 | 
			
		||||
$ export C_INCLUDE_PATH=/opt/homebrew/include
 | 
			
		||||
$ export CPLUS_INCLUDE_PATH=/opt/homebrew/include
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Install Meson using Homebrew.
 | 
			
		||||
 
 | 
			
		||||
@@ -89,7 +89,7 @@ $ sudo pfctl -e -f /etc/pf.anchors/org.open5gs
 | 
			
		||||
 | 
			
		||||
Install the depedencies for building the source code.
 | 
			
		||||
```bash
 | 
			
		||||
$ brew install mongo-c-driver gnutls libgcrypt libidn libyaml libmicrohttpd nghttp2 pkg-config libusrsctp
 | 
			
		||||
$ brew install mongo-c-driver gnutls libgcrypt libidn libyaml libmicrohttpd nghttp2 pkg-config libusrsctp libtins
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Install Bison and Create soft link.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										115
									
								
								docs/_docs/platform/08-alpine.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										115
									
								
								docs/_docs/platform/08-alpine.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,115 @@
 | 
			
		||||
---
 | 
			
		||||
title: Alpine
 | 
			
		||||
head_inline: "<style> .blue { color: blue; } </style>"
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
This guide is based on **Alpine 3.13** Distribution.
 | 
			
		||||
{: .blue}
 | 
			
		||||
 | 
			
		||||
### Getting MongoDB
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
Install MongoDB with package manager.
 | 
			
		||||
```bash
 | 
			
		||||
$ sudo apk update
 | 
			
		||||
$ sudo apk add mongodb
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Run MongoDB server.
 | 
			
		||||
```bash
 | 
			
		||||
$ mkdir -p ./data/db
 | 
			
		||||
$ mongod --dbpath ./data/db
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Setting up TUN device (No persistent after rebooting)
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
Create the TUN device. Interface name will be `ogstun`.
 | 
			
		||||
```bash
 | 
			
		||||
$ sudo apk add iproute2
 | 
			
		||||
$ sudo ip tuntap add name ogstun mode tun
 | 
			
		||||
$ ip link show
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
You are now ready to set the IP address on TUN device. 
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ sudo ip addr add 10.45.0.1/16 dev ogstun
 | 
			
		||||
$ sudo ip addr add 2001:230:cafe::1/48 dev ogstun
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Make sure it is set up properly.
 | 
			
		||||
```bash
 | 
			
		||||
$ sudo ip link set ogstun up
 | 
			
		||||
$ ip link show
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
**Tip:** The script provided in [$GIT_REPO/misc/netconf.sh](https://github.com/{{ site.github_username }}/open5gs/blob/main/misc/netconf.sh) makes it easy to configure the TUN device as follows:
 | 
			
		||||
`$ sudo ./misc/netconf.sh`
 | 
			
		||||
{: .notice--info}
 | 
			
		||||
 | 
			
		||||
### Building Open5GS
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
Install the depedencies for building the source code.
 | 
			
		||||
```bash
 | 
			
		||||
$ sudo apk add alpine-sdk bison flex git meson bash sudo linux-headers bsd-compat-headers yaml-dev lksctp-tools-dev gnutls-dev libgcrypt-dev libidn-dev mongo-c-driver-dev libmicrohttpd-dev curl-dev nghttp2-dev
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Git clone.
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ git clone https://github.com/{{ site.github_username }}/open5gs
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
To compile with meson:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ cd open5gs
 | 
			
		||||
$ meson build --prefix=`pwd`/install
 | 
			
		||||
$ ninja -C build
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Check whether the compilation is correct.
 | 
			
		||||
```bash
 | 
			
		||||
$ ./build/tests/attach/attach ## EPC Only
 | 
			
		||||
$ ./build/tests/registration/registration ## 5G Core Only
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Run all test programs as below.
 | 
			
		||||
```bash
 | 
			
		||||
$ cd build
 | 
			
		||||
$ meson test -v
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
**Tip:** You can also check the result of `ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || pfcp || diameter || gtp || ngap || http2.data.data || http2.headers`.  You can see the virtually created packets. [testattach.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testattach.pcapng)/[testregistration.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testregistration.pcapng)
 | 
			
		||||
{: .notice--info}
 | 
			
		||||
 | 
			
		||||
You need to perform the **installation process**.
 | 
			
		||||
```bash
 | 
			
		||||
$ cd build
 | 
			
		||||
$ ninja install
 | 
			
		||||
$ cd ../
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Building WebUI of Open5GS
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
[Node.js](https://nodejs.org/) is required to build WebUI of Open5GS
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ sudo apk add nodejs
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Install the dependencies to run WebUI
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ cd webui
 | 
			
		||||
$ npm ci --no-optional
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
The WebUI runs as an [npm](https://www.npmjs.com/) script.
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ npm run dev
 | 
			
		||||
```
 | 
			
		||||
@@ -25,10 +25,11 @@ open5gs  27543  0.0  0.0 222416  9672 ?        Ssl  12:13   0:00 /usr/bin/open5g
 | 
			
		||||
open5gs  27600  0.0  0.0 222328  9668 ?        Ssl  12:13   0:00 /usr/bin/open5gs-udmd -c /etc/open5gs/udm.yaml
 | 
			
		||||
open5gs  27600  0.0  0.0 222329  9669 ?        Ssl  12:13   0:00 /usr/bin/open5gs-pcfd -c /etc/open5gs/pcf.yaml
 | 
			
		||||
open5gs  27600  0.0  0.0 222329  9669 ?        Ssl  12:13   0:00 /usr/bin/open5gs-nssfd -c /etc/open5gs/nssf.yaml
 | 
			
		||||
open5gs  27600  0.0  0.0 222329  9669 ?        Ssl  12:13   0:00 /usr/bin/open5gs-bsfd -c /etc/open5gs/bsf.yaml
 | 
			
		||||
open5gs  27697  0.0  0.0 243976 13716 ?        Ssl  12:13   0:00 /usr/bin/open5gs-udrd -c /etc/open5gs/udr.yaml
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
You should see each of the above services, MME, SGW-C, SMF, AMF, SGW-U, UPF, HSS, PCRF, NRF, AUSF, UDM, PCF, NSSF & UDR are all running.
 | 
			
		||||
You should see each of the above services, MME, SGW-C, SMF, AMF, SGW-U, UPF, HSS, PCRF, NRF, AUSF, UDM, PCF, NSSF, BSF & UDR are all running.
 | 
			
		||||
 | 
			
		||||
If your instance doesn't show this make sure you're started each service:
 | 
			
		||||
```bash
 | 
			
		||||
@@ -45,6 +46,7 @@ $ systemctl start open5gs-ausfd.service
 | 
			
		||||
$ systemctl start open5gs-udmd.service
 | 
			
		||||
$ systemctl start open5gs-pcfd.service
 | 
			
		||||
$ systemctl start open5gs-nssfd.service
 | 
			
		||||
$ systemctl start open5gs-bsfd.service
 | 
			
		||||
$ systemctl start open5gs-udrd.service
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -10,9 +10,54 @@ head_inline: "<style> .blue { color: blue; } </style>"
 | 
			
		||||
  }
 | 
			
		||||
</style>
 | 
			
		||||
 | 
			
		||||
#### HSS crash using v2.2.x
 | 
			
		||||
#### MME sends Attach reject(EMM-Cause:15) with Diameter error(Result-Code:3002)
 | 
			
		||||
 | 
			
		||||
If the following MME log occurs while connecting to the UE, it means that the Open5GS upgrade was not properly performed.
 | 
			
		||||
If you see the Attach reject(EMM-Cause:15] with Diameter error(Result-Code:3002), it means that HSS is not running.
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
...
 | 
			
		||||
5/08 18:22:23.584: [diam] ERROR: pid:Routing-OUT (0x563969fc2060) in md_hook_cb_tree@dbg_msg_dumps.c:113:         AVP: 'Vendor-Specific-Application-Id'(260) l=8 f=-M val=(grouped)
 | 
			
		||||
 ((null):0)
 | 
			
		||||
05/08 18:22:23.584: [diam] ERROR: pid:Routing-OUT (0x563969fc2060) in md_hook_cb_tree@dbg_msg_dumps.c:113:            AVP: 'Vendor-Id'(266) l=12 f=-M val=10415 (0x28af)
 | 
			
		||||
 ((null):0)
 | 
			
		||||
05/08 18:22:23.584: [diam] ERROR: pid:Routing-OUT (0x563969fc2060) in md_hook_cb_tree@dbg_msg_dumps.c:113:            AVP: 'Auth-Application-Id'(258) l=12 f=-M val=16777251 (0x1000023)
 | 
			
		||||
 ((null):0)
 | 
			
		||||
05/08 18:22:23.584: [mme] INFO:     Result Code: 3002 (../src/mme/mme-fd-path.c:301)
 | 
			
		||||
05/08 18:22:23.585: [mme] INFO: [001010123456792] Attach reject [EMM_CAUSE:15] (../src/mme/mme-sm.c:448)
 | 
			
		||||
05/08 18:22:23.612: [mme] INFO: UE Context Release [Action:3] (../src/mme/s1ap-handler.c:1328)
 | 
			
		||||
05/08 18:22:23.612: [mme] INFO:     ENB_UE_S1AP_ID[1] MME_UE_S1AP_ID[1] (../src/mme/s1ap-handler.c:1330)
 | 
			
		||||
05/08 18:22:23.612: [mme] INFO:     IMSI[001010123456792] (../src/mme/s1ap-handler.c:1332)
 | 
			
		||||
05/08 18:22:23.612: [mme] INFO: [Removed] Number of eNB-UEs is now 0 (../src/mme/mme-context.c:3228)
 | 
			
		||||
...
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Please check the status of HSS and restart it.
 | 
			
		||||
```
 | 
			
		||||
$ sudo systemctl status open5gs-hssd.service
 | 
			
		||||
● open5gs-hssd.service - Open5GS HSS Daemon
 | 
			
		||||
     Loaded: loaded (/lib/systemd/system/open5gs-hssd.service; disabled; vendor preset: enabled)
 | 
			
		||||
     Active: inactive (dead)
 | 
			
		||||
sudo systemctl status open5gs-hssd.service
 | 
			
		||||
● open5gs-hssd.service - Open5GS HSS Daemon
 | 
			
		||||
     Loaded: loaded (/lib/systemd/system/open5gs-hssd.service; disabled; vendor preset: enabled)
 | 
			
		||||
     Active: active (running) since Sun 2021-05-09 18:36:49 KST; 1s ago
 | 
			
		||||
   Main PID: 6011 (open5gs-hssd)
 | 
			
		||||
      Tasks: 37 (limit: 19047)
 | 
			
		||||
     Memory: 14.6M
 | 
			
		||||
     CGroup: /system.slice/open5gs-hssd.service
 | 
			
		||||
             └─6011 /usr/bin/open5gs-hssd -c /etc/open5gs/hss.yaml
 | 
			
		||||
 | 
			
		||||
May 09 18:36:49 open5gs systemd[1]: Started Open5GS HSS Daemon.
 | 
			
		||||
May 09 18:36:49 open5gs open5gs-hssd[6011]: Open5GS daemon v2.2.7
 | 
			
		||||
May 09 18:36:49 open5gs open5gs-hssd[6011]: 05/09 18:36:49.987: [app] INFO: Configuration: '/etc/ope>
 | 
			
		||||
May 09 18:36:49 open5gs open5gs-hssd[6011]: 05/09 18:36:49.987: [app] INFO: File Logging: '/var/log/>
 | 
			
		||||
May 09 18:36:49 open5gs open5gs-hssd[6011]: 05/09 18:36:49.994: [dbi] INFO: MongoDB URI: 'mongodb://>
 | 
			
		||||
May 09 18:36:50 open5gs open5gs-hssd[6011]: 05/09 18:36:50.116: [app] INFO: HSS initialize...done
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
#### MME Diameter-Error with HSS-crash using v2.2.x package
 | 
			
		||||
 | 
			
		||||
If the following MME log occurs while connecting to the UE, it means that you may use the old format DB schema.
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
04/14 20:14:21.981: [diam] ERROR: pid:PSM/hss.localdomain in fd_psm_change_state@p_psm.c:287: 'STATE_OPEN' -> 'STATE_CLOSED' 'hss.localdomain'
 | 
			
		||||
@@ -44,8 +89,123 @@ home/open5gs/install/lib/x86_64-linux-gnu/libfdcore.so.7(+0x67c3c) [0x7f3b715f9c
 | 
			
		||||
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f3b70a2a71f]
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
First of all, it is recommended to use the following command to remove all existing subscription DB.
 | 
			
		||||
At this time, you need to check the DB schema is in the form below by using the command the below.
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
$ mongo
 | 
			
		||||
> use open5gs
 | 
			
		||||
> db.subscribers.find().pretty()
 | 
			
		||||
{
 | 
			
		||||
	"_id" : ObjectId("60969fe79459f8b40d8d3f68"),
 | 
			
		||||
	"imsi" : "901700000000001",
 | 
			
		||||
	"__v" : 0,
 | 
			
		||||
	"access_restriction_data" : 32,
 | 
			
		||||
	"ambr" : {
 | 
			
		||||
		"uplink" : {
 | 
			
		||||
			"value" : 1,
 | 
			
		||||
			"unit" : 3
 | 
			
		||||
		},
 | 
			
		||||
		"downlink" : {
 | 
			
		||||
			"value" : 1,
 | 
			
		||||
			"unit" : 3
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
	"network_access_mode" : 2,
 | 
			
		||||
	"security" : {
 | 
			
		||||
		"k" : "465b5ce8b199b49faa5f0a2ee238a6bc",
 | 
			
		||||
		"amf" : "8000",
 | 
			
		||||
		"op" : null,
 | 
			
		||||
		"opc" : "e8ed289deba952e4283b54e88e6183ca",
 | 
			
		||||
		"sqn" : NumberLong(97)
 | 
			
		||||
	},
 | 
			
		||||
	"slice" : [
 | 
			
		||||
		{
 | 
			
		||||
			"sst" : 1,
 | 
			
		||||
			"default_indicator" : true,
 | 
			
		||||
			"_id" : ObjectId("60969fe7de8743b3c7b1a973"),
 | 
			
		||||
			"session" : [
 | 
			
		||||
				{
 | 
			
		||||
					"name" : "internet",
 | 
			
		||||
					"type" : 3,
 | 
			
		||||
					"_id" : ObjectId("60969fe7de8743b3c7b1a974"),
 | 
			
		||||
					"pcc_rule" : [ ],
 | 
			
		||||
					"ambr" : {
 | 
			
		||||
						"uplink" : {
 | 
			
		||||
							"value" : 1,
 | 
			
		||||
							"unit" : 3
 | 
			
		||||
						},
 | 
			
		||||
						"downlink" : {
 | 
			
		||||
							"value" : 1,
 | 
			
		||||
							"unit" : 3
 | 
			
		||||
						}
 | 
			
		||||
					},
 | 
			
		||||
					"qos" : {
 | 
			
		||||
						"index" : 9,
 | 
			
		||||
						"arp" : {
 | 
			
		||||
							"priority_level" : 8,
 | 
			
		||||
							"pre_emption_capability" : 1,
 | 
			
		||||
							"pre_emption_vulnerability" : 1
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			]
 | 
			
		||||
		}
 | 
			
		||||
	],
 | 
			
		||||
	"subscribed_rau_tau_timer" : 12,
 | 
			
		||||
	"subscriber_status" : 0
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
If you see below, you are using the old format DB schema.
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
$ mongo
 | 
			
		||||
> use open5gs
 | 
			
		||||
> db.subscribers.find().pretty()
 | 
			
		||||
{
 | 
			
		||||
	"_id" : ObjectId("609715fda08851a0744e6ae7"),
 | 
			
		||||
	"imsi" : "901700000021309",
 | 
			
		||||
	"__v" : 0,
 | 
			
		||||
	"access_restriction_data" : 32,
 | 
			
		||||
	"ambr" : {
 | 
			
		||||
		"downlink" : NumberLong(1024000),
 | 
			
		||||
		"uplink" : NumberLong(1024000)
 | 
			
		||||
	},
 | 
			
		||||
	"network_access_mode" : 2,
 | 
			
		||||
	"pdn" : [
 | 
			
		||||
		{
 | 
			
		||||
			"apn" : "internet",
 | 
			
		||||
			"_id" : ObjectId("609715fd455bcd38c884ce85"),
 | 
			
		||||
			"pcc_rule" : [ ],
 | 
			
		||||
			"ambr" : {
 | 
			
		||||
				"downlink" : NumberLong(1024000),
 | 
			
		||||
				"uplink" : NumberLong(1024000)
 | 
			
		||||
			},
 | 
			
		||||
			"qos" : {
 | 
			
		||||
				"qci" : 9,
 | 
			
		||||
				"arp" : {
 | 
			
		||||
					"priority_level" : 8,
 | 
			
		||||
					"pre_emption_vulnerability" : 1,
 | 
			
		||||
					"pre_emption_capability" : 0
 | 
			
		||||
				}
 | 
			
		||||
			},
 | 
			
		||||
			"type" : 0
 | 
			
		||||
		}
 | 
			
		||||
	],
 | 
			
		||||
	"security" : {
 | 
			
		||||
		"k" : "70D49A71DD1A2B806A25ABE0EF749F1E",
 | 
			
		||||
		"amf" : "8000",
 | 
			
		||||
		"op" : null,
 | 
			
		||||
		"opc" : "6F1BF53D624B3A43AF6592854E2444C7"
 | 
			
		||||
	},
 | 
			
		||||
	"subscribed_rau_tau_timer" : 12,
 | 
			
		||||
	"subscriber_status" : 0
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
If you are using old format DB schema, please perform the following step.
 | 
			
		||||
 | 
			
		||||
1. First of all, it is recommended to use the following command to remove all existing subscription DB.
 | 
			
		||||
```
 | 
			
		||||
$ mongo
 | 
			
		||||
> use open5gs
 | 
			
		||||
@@ -53,8 +213,28 @@ switched to db open5gs
 | 
			
		||||
> db.subscribers.drop()
 | 
			
		||||
true
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Then, if you are using a version of WebUI prior to v2.1.7, you need to log out. Finally, install the latest version of WebUI and add subscriber information.
 | 
			
		||||
2. Then, if you are using a version of WebUI prior to v2.1.7, you need to do a WebUI logout from your web browser.
 | 
			
		||||
3. Finally, install the latest version of WebUI with the following command.
 | 
			
		||||
```
 | 
			
		||||
$ curl -fsSL https://open5gs.org/open5gs/assets/webui/install | sudo -E bash -
 | 
			
		||||
```
 | 
			
		||||
4. Log in to the new WebUI and add new subscriber information using your web browser.
 | 
			
		||||
5. Make sure it is a new DB schema as below:
 | 
			
		||||
```
 | 
			
		||||
$ mongo
 | 
			
		||||
> use open5gs
 | 
			
		||||
> db.subscribers.find().pretty()
 | 
			
		||||
{
 | 
			
		||||
...
 | 
			
		||||
	"slice" : [
 | 
			
		||||
		{
 | 
			
		||||
			"sst" : 1,
 | 
			
		||||
			"default_indicator" : true,
 | 
			
		||||
			"_id" : ObjectId("60969fe7de8743b3c7b1a973"),
 | 
			
		||||
			"session" : [
 | 
			
		||||
...
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
If the above problem still occurs, we recommend that you delete all Open5GS and start from scratch.
 | 
			
		||||
 | 
			
		||||
@@ -100,6 +280,7 @@ $ sudo pkill -9 open5gs-ausfd
 | 
			
		||||
$ sudo pkill -9 open5gs-udmd
 | 
			
		||||
$ sudo pkill -9 open5gs-pcfd
 | 
			
		||||
$ sudo pkill -9 open5gs-nssfd
 | 
			
		||||
$ sudo pkill -9 open5gs-bsfd
 | 
			
		||||
$ sudo pkill -9 open5gs-udrd
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
@@ -233,6 +414,7 @@ $ open5gs-ausfd
 | 
			
		||||
$ open5gs-udmd
 | 
			
		||||
$ open5gs-pcfd
 | 
			
		||||
$ open5gs-nssfd
 | 
			
		||||
$ open5gs-bsfd
 | 
			
		||||
$ open5gs-udrd
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
@@ -438,6 +620,7 @@ $ sudo pkill -9 open5gs-ausfd
 | 
			
		||||
$ sudo pkill -9 open5gs-udmd
 | 
			
		||||
$ sudo pkill -9 open5gs-pcfd
 | 
			
		||||
$ sudo pkill -9 open5gs-nssfd
 | 
			
		||||
$ sudo pkill -9 open5gs-bsfd
 | 
			
		||||
$ sudo pkill -9 open5gs-udrd
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
@@ -898,6 +1081,7 @@ Currently, the number of UE is limited to `128*128`.
 | 
			
		||||
* UDM : 127.0.0.12
 | 
			
		||||
* PCF : 127.0.0.13
 | 
			
		||||
* NSSF : 127.0.0.14
 | 
			
		||||
* BSF : 127.0.0.15
 | 
			
		||||
* UDR : 127.0.0.20
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -8,12 +8,12 @@ This post is the perfect starting point for learning to build your own LTE netwo
 | 
			
		||||
### Prerequisites
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
First, you have to prepare USRP B200/B210 to run srsENB. However, please keep in mind that you would still need a fairly high-end PC (at least dual-core i5, better quad-core i7) with USB 3.0 to attach the USRP B200/B210. 
 | 
			
		||||
First, you have to prepare USRP B200/B210 to run srsRAN. However, please keep in mind that you would still need a fairly high-end PC (at least dual-core i5, better quad-core i7) with USB 3.0 to attach the USRP B200/B210. 
 | 
			
		||||
 | 
			
		||||
For USRP B200/B210, you can use a GPS antenna for clock synchronization. Of course, it can work without a GPS antenna, but if you have that antenna, it's a good to have a window near your desk where you can put the small GPS patch antenna. In my case, a 1 to 2 meters antenna cable is used between desk/computer and the window.
 | 
			
		||||
 | 
			
		||||
This document will be described with the following equipment.
 | 
			
		||||
 - i5-8500 PC with Ubuntu 18.04(bionic)
 | 
			
		||||
 - i5-8500 PC with Ubuntu 20.04(focal)
 | 
			
		||||
 - USRP B200/B210 with USB 3.0
 | 
			
		||||
 - iPhone XS
 | 
			
		||||
 - sysmoUSIM-SJS1
 | 
			
		||||
@@ -112,7 +112,7 @@ Done !
 | 
			
		||||
### Installation
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
We will use *Ubuntu 18.04(Bionic)* installed PC.
 | 
			
		||||
We will use *Ubuntu 20.04(focal)* installed PC.
 | 
			
		||||
{: .blue .bold}
 | 
			
		||||
 | 
			
		||||
#### 1. USRP Hardware Driver
 | 
			
		||||
@@ -131,9 +131,9 @@ After installing, you need to download the FPGA images packages by running _uhd
 | 
			
		||||
$ sudo /usr/lib/uhd/utils/uhd_images_downloader.py
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
#### 2. srsENB
 | 
			
		||||
#### 2. srsRAN
 | 
			
		||||
 | 
			
		||||
On *Ubuntu 18.04(Bionic)*, one can install the required libraries with:
 | 
			
		||||
On *Ubuntu 20.04(focal)*, one can install the required libraries with:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ sudo apt install cmake libfftw3-dev libmbedtls-dev libboost-program-options-dev libconfig++-dev libsctp-dev
 | 
			
		||||
@@ -142,11 +142,11 @@ $ sudo apt install cmake libfftw3-dev libmbedtls-dev libboost-program-options-de
 | 
			
		||||
Download and build srsLTE:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ git clone https://github.com/srsLTE/srsLTE.git
 | 
			
		||||
$ cd srsLTE
 | 
			
		||||
$ git checkout release_19_12
 | 
			
		||||
$ git clone https://github.com/srsRAN/srsRAN.git
 | 
			
		||||
$ cd srsRAN
 | 
			
		||||
$ git checkout release_21_04
 | 
			
		||||
$ git rev-parse HEAD
 | 
			
		||||
d045213fb9cbf98c83c06d7c17197a9dcbfddacf
 | 
			
		||||
1c6dd8c4adc8419d4a431f382283539f1719582a
 | 
			
		||||
$ mkdir build
 | 
			
		||||
$ cd build
 | 
			
		||||
$ cmake ../
 | 
			
		||||
@@ -161,11 +161,11 @@ The Open5GS package is available on the recent versions of *Ubuntu*.
 | 
			
		||||
```bash
 | 
			
		||||
# Getting the authentication key
 | 
			
		||||
$ sudo apt install wget
 | 
			
		||||
$ wget https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_18.04/Release.key
 | 
			
		||||
$ wget https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_20.04/Release.key
 | 
			
		||||
$ sudo apt-key add Release.key
 | 
			
		||||
 | 
			
		||||
# Installing Open5GS
 | 
			
		||||
$ sudo sh -c "echo 'deb https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_18.04/ ./' > /etc/apt/sources.list.d/open5gs.list"
 | 
			
		||||
$ sudo sh -c "echo 'deb https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_20.04/ ./' > /etc/apt/sources.list.d/open5gs.list"
 | 
			
		||||
$ sudo apt update
 | 
			
		||||
$ sudo apt install open5gs
 | 
			
		||||
```
 | 
			
		||||
@@ -173,9 +173,9 @@ $ sudo apt install open5gs
 | 
			
		||||
The following shows how to install the Web UI of Open5GS.
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
 | 
			
		||||
$ curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
 | 
			
		||||
$ sudo apt install nodejs
 | 
			
		||||
$ curl -sL https://open5gs.org/open5gs/assets/webui/install | sudo -E bash -
 | 
			
		||||
$ curl -fsSL https://open5gs.org/open5gs/assets/webui/install | sudo -E bash -
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Configuration & Running
 | 
			
		||||
@@ -320,46 +320,62 @@ $ sudo ip6tables -t nat -A POSTROUTING -s 2001:230:cafe::/48 ! -o ogstun -j MASQ
 | 
			
		||||
**Note:** For the first time, it is a good condition if you do not have any rules in the IP/NAT tables. If a program such as docker has already set up a rule, you will need to add a rule differently.
 | 
			
		||||
{: .notice--danger}
 | 
			
		||||
 | 
			
		||||
#### 2. srsENB
 | 
			
		||||
Change back to the srsENB source directory and copy the main config example as well as all additional config files for RR, SIB and DRB.
 | 
			
		||||
#### 2. srsRAN
 | 
			
		||||
Change back to the srsRAN source directory and copy the main config example as well as all additional config files for RR, SIB and DRB.
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ cp srsenb/enb.conf.example srsenb/enb.conf
 | 
			
		||||
$ cp srsenb/rr.conf.example srsenb/rr.conf
 | 
			
		||||
$ cp srsenb/sib.conf.example srsenb/sib.conf
 | 
			
		||||
$ cp srsenb/drb.conf.example srsenb/drb.conf
 | 
			
		||||
$ cp srsenb/sib.conf.example srsenb/sib.conf
 | 
			
		||||
$ cp srsenb/sib.conf.mbsfn.example srsenb/sib.conf.mbsfn
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
You should check your phone frequency. If your phone does not support Band-3, you should use a different DL EARFCN value.
 | 
			
		||||
 | 
			
		||||
```diff
 | 
			
		||||
--- enb.conf.example	2018-11-19 18:16:06.953631893 +0900
 | 
			
		||||
+++ enb.conf	2019-04-08 11:15:18.051261318 +0900
 | 
			
		||||
@@ -23,8 +23,8 @@
 | 
			
		||||
 cell_id = 0x01
 | 
			
		||||
 phy_cell_id = 1
 | 
			
		||||
 tac = 0x0007
 | 
			
		||||
$ diff -u enb.conf.example enb.conf
 | 
			
		||||
--- enb.conf.example	2021-08-23 12:00:03.975297244 +0900
 | 
			
		||||
+++ enb.conf	2021-08-23 14:34:01.794290668 +0900
 | 
			
		||||
@@ -19,8 +19,10 @@
 | 
			
		||||
 #####################################################################
 | 
			
		||||
 [enb]
 | 
			
		||||
 enb_id = 0x19B
 | 
			
		||||
-mcc = 001
 | 
			
		||||
-mnc = 01
 | 
			
		||||
+mcc = 310
 | 
			
		||||
+mnc = 789
 | 
			
		||||
+#mcc = 001
 | 
			
		||||
+#mnc = 01
 | 
			
		||||
+mcc = 901
 | 
			
		||||
+mnc = 70
 | 
			
		||||
 mme_addr = 127.0.1.100
 | 
			
		||||
 gtp_bind_addr = 127.0.1.1
 | 
			
		||||
 s1c_bind_addr = 127.0.1.1
 | 
			
		||||
@@ -66,12 +66,13 @@
 | 
			
		||||
 #                     Default "auto". B210 USRP: 400 us, bladeRF: 0 us.
 | 
			
		||||
 #####################################################################
 | 
			
		||||
 [rf]
 | 
			
		||||
-dl_earfcn = 3400
 | 
			
		||||
+dl_earfcn = 1600
 | 
			
		||||
@@ -65,7 +67,7 @@
 | 
			
		||||
 tx_gain = 80
 | 
			
		||||
 rx_gain = 40
 | 
			
		||||
 | 
			
		||||
 #device_name = auto
 | 
			
		||||
 #device_args = auto
 | 
			
		||||
+device_args="clock=external"
 | 
			
		||||
 #time_adv_nsamples = auto
 | 
			
		||||
 #burst_preamble_us = auto
 | 
			
		||||
-#device_name = auto
 | 
			
		||||
+device_name = auto
 | 
			
		||||
 | 
			
		||||
 # For best performance in 2x2 MIMO and >= 15 MHz use the following device_args settings:
 | 
			
		||||
 #     USRP B210: num_recv_frames=64,num_send_frames=64
 | 
			
		||||
@@ -80,6 +82,7 @@
 | 
			
		||||
 # Example for ZMQ-based operation with TCP transport for I/Q samples
 | 
			
		||||
 #device_name = zmq
 | 
			
		||||
 #device_args = fail_on_disconnect=true,tx_port=tcp://*:2000,rx_port=tcp://localhost:2001,id=enb,base_srate=23.04e6
 | 
			
		||||
+device_args = clock=external
 | 
			
		||||
 | 
			
		||||
 #####################################################################
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
```diff
 | 
			
		||||
$ diff -u rr.conf.example rr.conf
 | 
			
		||||
diff rr.conf.example rr.conf
 | 
			
		||||
61c61,62
 | 
			
		||||
<     dl_earfcn = 3350;
 | 
			
		||||
---
 | 
			
		||||
>     // dl_earfcn = 3350;
 | 
			
		||||
>     dl_earfcn = 1600;
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
PLMN ID, DL EARFCN, and Device Argument are updated as belows.
 | 
			
		||||
@@ -372,14 +388,20 @@ Device Argument : Clock source from external GPS-DO
 | 
			
		||||
 | 
			
		||||
If you do not use the GPS-DO, you should use:
 | 
			
		||||
```diff
 | 
			
		||||
 #device_name = auto
 | 
			
		||||
-#device_args = auto
 | 
			
		||||
+device_args = auto
 | 
			
		||||
 #time_adv_nsamples = auto
 | 
			
		||||
 #burst_preamble_us = auto
 | 
			
		||||
$ diff -u enb.conf.example enb.conf
 | 
			
		||||
--- enb.conf.example	2021-08-23 14:32:35.585438813 +0900
 | 
			
		||||
+++ enb.conf	2021-08-23 14:32:08.350450409 +0900
 | 
			
		||||
@@ -82,7 +82,6 @@
 | 
			
		||||
 # Example for ZMQ-based operation with TCP transport for I/Q samples
 | 
			
		||||
 #device_name = zmq
 | 
			
		||||
 #device_args = fail_on_disconnect=true,tx_port=tcp://*:2000,rx_port=tcp://localhost:2001,id=enb,base_srate=23.04e6
 | 
			
		||||
-device_args = clock=external
 | 
			
		||||
 | 
			
		||||
 #####################################################################
 | 
			
		||||
 # Packet capture configuration
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Now, run the srsENB as follows:
 | 
			
		||||
Now, run the srsRAN as follows:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ cd srsenb/
 | 
			
		||||
 
 | 
			
		||||
@@ -1132,7 +1132,7 @@ Visited Network = ims.mnc001.mcc001.3gppnetwork.org
 | 
			
		||||
Click Add
 | 
			
		||||
 | 
			
		||||
Associate IMPI(s) to IMPU
 | 
			
		||||
IMPI Identity = 001011234567891@ims.mnc001.mcc001.3gppnetwork.org
 | 
			
		||||
IMPI Identity = 001010123456791@ims.mnc001.mcc001.3gppnetwork.org
 | 
			
		||||
Click Add
 | 
			
		||||
 | 
			
		||||
2. sip:0198765432100@ims.mnc001.mcc001.3gppnetwork.org
 | 
			
		||||
@@ -1151,12 +1151,12 @@ Visited Network = ims.mnc001.mcc001.3gppnetwork.org
 | 
			
		||||
Click Add
 | 
			
		||||
 | 
			
		||||
Associate IMPI(s) to IMPU
 | 
			
		||||
IMPI Identity = 001011234567891@ims.mnc001.mcc001.3gppnetwork.org
 | 
			
		||||
IMPI Identity = 001010123456791@ims.mnc001.mcc001.3gppnetwork.org
 | 
			
		||||
Click Add
 | 
			
		||||
 | 
			
		||||
And, finally add these IMPUs as implicit set of IMSI derived IMPU in HSS i.e sip:001011234567891@ims.mnc001.mcc001.3gppnetwork.org as follows:
 | 
			
		||||
And, finally add these IMPUs as implicit set of IMSI derived IMPU in HSS i.e sip:001010123456791@ims.mnc001.mcc001.3gppnetwork.org as follows:
 | 
			
		||||
 | 
			
		||||
1. Goto to IMPU sip:001011234567891@ims.mnc001.mcc001.3gppnetwork.org
 | 
			
		||||
1. Goto to IMPU sip:001010123456791@ims.mnc001.mcc001.3gppnetwork.org
 | 
			
		||||
2. In "Add IMPU(s) to Implicit-Set" section give IMPU Identity created above to be added to this IMPU
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -16,12 +16,13 @@ Open5GS is a C-language Open Source implementation of 5GC and EPC, i.e. the core
 | 
			
		||||
- Multiple PDU session
 | 
			
		||||
- Handover(5GC Xn/N2 and EPC S1/X2)
 | 
			
		||||
- CSFB(Circuit Switched Fall Back) and SMSoS(SMS Over SGs)
 | 
			
		||||
- VoLTE(Voice over LTE)
 | 
			
		||||
- Support ePDG Interface(SWx, S6b, S2b)
 | 
			
		||||
- VoLTE(Voice over LTE) with HSS-Cx interface
 | 
			
		||||
- VoNR(Voice over NR)
 | 
			
		||||
 | 
			
		||||
#### Known Limitations
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
- No VoNR(Voice over NR)
 | 
			
		||||
- No Interworking with EPC
 | 
			
		||||
- No NB-IoT
 | 
			
		||||
- No OCS/OFCS
 | 
			
		||||
@@ -29,4 +30,3 @@ Open5GS is a C-language Open Source implementation of 5GC and EPC, i.e. the core
 | 
			
		||||
- No SRVCC
 | 
			
		||||
- No Roaming
 | 
			
		||||
- No Emergency Call
 | 
			
		||||
- No ePDG Gateway
 | 
			
		||||
 
 | 
			
		||||
@@ -25,6 +25,7 @@ head_inline: "<style> ul { padding-bottom: 1em; } </style>"
 | 
			
		||||
  - [MacOSX(Apple Silicon)](platform/05-macosx-apple-silicon)
 | 
			
		||||
  - [MacOSX(Intel)](platform/06-macosx-intel)
 | 
			
		||||
  - [FreeBSD](platform/07-freebsd)
 | 
			
		||||
  - [Alpine](platform/08-alpine)
 | 
			
		||||
  
 | 
			
		||||
- Hardware Specific Notes
 | 
			
		||||
  - [eNodeBs/gNodeBs tested on Open5GS](hardware/01-genodebs)
 | 
			
		||||
@@ -34,11 +35,13 @@ head_inline: "<style> ul { padding-bottom: 1em; } </style>"
 | 
			
		||||
 | 
			
		||||
- @nickvsnetworking
 | 
			
		||||
  - [My first 5G Core : Open5GS and UERANSIM](http://nickvsnetworking.com/my-first-5g-core-open5gs-and-ueransim/)
 | 
			
		||||
  - [Backing up and restoring Open5GS](https://nickvsnetworking.com/backing-up-and-restoring-open5gs/)
 | 
			
		||||
  - [Open5Gs Without NAT](https://nickvsnetworking.com/open5gs-without-nat/)
 | 
			
		||||
  - [Sending SMS in Open5GS LTE Networks using the SGs Interface and OsmoMSC](https://nickvsnetworking.com/sending-sms-in-open5gs-lte-networks-using-the-sgs-interface-and-osmomsc-with-smsos/)
 | 
			
		||||
  - [OsmoMSC and Open5GS MME – SGs Interface for CSCF / InterRAT Handover](https://nickvsnetworking.com/osmomsc-and-open5gs-mme-sgs-interface-for-cscf-interran-handover/)
 | 
			
		||||
  - [Static IPs for UEs](http://nickvsnetworking.com/open5gs-epc-static-ip-addresses-for-ues-apns-subscribers/)
 | 
			
		||||
 | 
			
		||||
- @s5uishida
 | 
			
		||||
  - [EPC Advanced Example with OpenAirInterface UE/RAN](https://github.com/s5uishida/open5gs_epc_oai_sample_config)
 | 
			
		||||
  - [5GC Advanced Example with UERANSIM](https://github.com/s5uishida/open5gs_5gc_ueransim_sample_config)
 | 
			
		||||
 | 
			
		||||
  - [Open5GS EPC & OpenAirInterface UE/RAN Sample configuration](https://github.com/s5uishida/open5gs_epc_oai_sample_config)
 | 
			
		||||
  - [Open5GS 5GC & UERANSIM UE/RAN Sample Configuration](https://github.com/s5uishida/open5gs_5gc_ueransim_sample_config)
 | 
			
		||||
  - [Open5GS & UERANSIM - Select nearby UPF according to the connected gNodeB](https://github.com/s5uishida/open5gs_5gc_ueransim_nearby_upf_sample_config)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										83
									
								
								docs/_posts/2021-05-09-release-v2.2.8.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										83
									
								
								docs/_posts/2021-05-09-release-v2.2.8.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,83 @@
 | 
			
		||||
---
 | 
			
		||||
title: "v2.2.8 - Security Protection"
 | 
			
		||||
date: 2021-05-09 11:27:00 +0900
 | 
			
		||||
categories:
 | 
			
		||||
  - Release
 | 
			
		||||
tags:
 | 
			
		||||
  - News
 | 
			
		||||
  - Release
 | 
			
		||||
head_inline: "<style> ul { padding-bottom: 1em; } .blue { color: blue; }</style>"
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
#### Bug Fixes
 | 
			
		||||
- [AMF] Distinguish between Cleartext and Non-cleartext IEs ([#958](https://github.com/open5gs/open5gs/issues/958), [UERANSIM#316](https://github.com/aligungr/UERANSIM/issues/316)) -- [p1-bmu](https://github.com/p1-bmu), [aligungr](https://github.com/aligungr)
 | 
			
		||||
- [AMF] Fix SBI convert error for ng_ap_cause ([UERANSIM#316](https://github.com/aligungr/UERANSIM/issues/316)) -- [aligungr](https://github.com/aligungr)
 | 
			
		||||
- [AMF] Allocate ngKSI other than the value already used ([UERANSIM#316](https://github.com/aligungr/UERANSIM/issues/316)) -- [aligungr](https://github.com/aligungr)
 | 
			
		||||
- [AMF] fix the UE-AMBR usage in NGAP message ([#979](https://github.com/open5gs/open5gs/issues/979)) -- [mcatalancid](https://github.com/mcatalancid)
 | 
			
		||||
- [SMF/UPF] Add assertion for getprotobyname() error when decoding IPFilterRule ([#977](https://github.com/open5gs/open5gs/issues/977)) -- [herlesupreeth](https://github.com/herlesupreeth)
 | 
			
		||||
- [MME/SGW-C] Fix the bug of encoding GTPv2 PLMN-ID ([#969](https://github.com/open5gs/open5gs/issues/969)) -- [gusbourg](https://github.com/gusbourg)
 | 
			
		||||
- [MME] Fix the bug of encoding NAS AMBR ([#967](https://github.com/open5gs/open5gs/issues/967)) -- [matt9j](https://github.com/matt9j)
 | 
			
		||||
- [AMF] Protetion of malformed NGAP message ([#960](https://github.com/open5gs/open5gs/issues/960)) -- [p1-bmu](https://github.com/p1-bmu)
 | 
			
		||||
- [AMF] Protetion of malformed NAS message ([#959](https://github.com/open5gs/open5gs/issues/959)) -- [p1-bmu](https://github.com/p1-bmu)
 | 
			
		||||
- [WebUI] fix the security flaw in default admin account ([#764](https://github.com/open5gs/open5gs/issues/764)) -- [martinzhou2015](https://github.com/martinzhou2015)
 | 
			
		||||
 | 
			
		||||
#### New Features
 | 
			
		||||
- [OS] Support Alpine ([#957](https://github.com/open5gs/open5gs/pull/957), [#968](https://github.com/open5gs/open5gs/pull/968)) -- [venkatpilla](https://github.com/venkatpilla)
 | 
			
		||||
 | 
			
		||||
#### IMPORTANT Using v2.2.x
 | 
			
		||||
 | 
			
		||||
- **DB Schema Changes:** If you are using an existing subscription DB, you should delete the existing DB. Then you can add a new subscription DB.
 | 
			
		||||
{: .blue}
 | 
			
		||||
```
 | 
			
		||||
$ mongo
 | 
			
		||||
> use open5gs
 | 
			
		||||
switched to db open5gs
 | 
			
		||||
> db.subscribers.drop()
 | 
			
		||||
true
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
- **The New WebUI:** You have to log out using the old WebUI backend/frontend. Then, you can log back in again using the new WebUI backend/frontend.
 | 
			
		||||
{: .blue}
 | 
			
		||||
```
 | 
			
		||||
$ git checkout v2.1.7
 | 
			
		||||
$ cd webui
 | 
			
		||||
$ rm -Rf ./node_modules
 | 
			
		||||
$ npm ci --no-optional
 | 
			
		||||
$ npm run dev
 | 
			
		||||
 | 
			
		||||
## You should log out
 | 
			
		||||
 | 
			
		||||
$ git checkout main
 | 
			
		||||
$ cd webui
 | 
			
		||||
$ rm -Rf ./node_modules
 | 
			
		||||
$ npm ci --no-optional
 | 
			
		||||
$ npm run dev
 | 
			
		||||
 | 
			
		||||
## You can log back in
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
- freeDiameter version has changed from 1.3.2 to 1.5.0. If you want to compile the source code, you need to update meson subprojects as shown below.
 | 
			
		||||
{: .blue}
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
$ cd open5gs
 | 
			
		||||
$ git pull
 | 
			
		||||
$ meson subprojects update
 | 
			
		||||
$ cd build
 | 
			
		||||
$ ninja
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Or just use a clean github repository.
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
$ rm -Rf open5gs
 | 
			
		||||
$ git clone https://github.com/open5gs/open5gs
 | 
			
		||||
$ cd open5gs
 | 
			
		||||
$ meson build --prefix=`pwd`/install
 | 
			
		||||
$ cd build
 | 
			
		||||
$ ninja
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Download -- [v2.2.8.tar.gz](https://github.com/open5gs/open5gs/archive/v2.2.8.tar.gz)
 | 
			
		||||
{: .notice--info}
 | 
			
		||||
							
								
								
									
										77
									
								
								docs/_posts/2021-05-19-release-v2.2.9.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								docs/_posts/2021-05-19-release-v2.2.9.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,77 @@
 | 
			
		||||
---
 | 
			
		||||
title: "v2.2.9 - Ubuntu 21.04(hirsute) Release"
 | 
			
		||||
date: 2021-05-19 14:13:00 +0900
 | 
			
		||||
categories:
 | 
			
		||||
  - Release
 | 
			
		||||
tags:
 | 
			
		||||
  - News
 | 
			
		||||
  - Release
 | 
			
		||||
head_inline: "<style> ul { padding-bottom: 1em; } .blue { color: blue; }</style>"
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
#### Bug Fixes
 | 
			
		||||
- [AMF] Fix the bug related to Cleartext and Non-cleartext IEs 
 | 
			
		||||
([#1006](https://github.com/open5gs/open5gs/issues/1006), [#958](https://github.com/open5gs/open5gs/issues/958), [UERANSIM#316](https://github.com/aligungr/UERANSIM/issues/316)) -- [ramonss](https://github.com/ramonss), [p1-bmu](https://github.com/p1-bmu), [aligungr](https://github.com/aligungr)
 | 
			
		||||
- [AMF] Add protection code for message(asn1c, nas, gtp, pfcp) encoding ([#991](https://github.com/open5gs/open5gs/issues/991)) -- [shuimoshusheng](https://github.com/shuimoshusheng)
 | 
			
		||||
- [MME] Packet filter (flow) precedence should be assigned within the session, not bearer. ([#1001](https://github.com/open5gs/open5gs/pull/1001)) -- [herlesupreeth](https://github.com/herlesupreeth)
 | 
			
		||||
- [MME/SGW-C/SGW-U/SMF/UPF] Force shutdown when UDP port duplicated with other process ([#986](https://github.com/open5gs/open5gs/issues/986), [#992](https://github.com/open5gs/open5gs/issues/992)) -- [ybouhamza](https://github.com/ybouhamza), [polhenarejos](https://github.com/polhenarejos)
 | 
			
		||||
- [AMF] Fix the error of decoding Extended-RANNodeName ([#994](https://github.com/open5gs/open5gs/issues/994)) -- [fefer](https://github.com/fefer)
 | 
			
		||||
- [AMF] Add more buffer for 5GMM capability ([#959](https://github.com/open5gs/open5gs/issues/959)) -- [p1-bmu](https://github.com/p1-bmu)
 | 
			
		||||
 | 
			
		||||
#### IMPORTANT Using v2.2.x
 | 
			
		||||
 | 
			
		||||
- **DB Schema Changes:** If you are using an existing subscription DB, you should delete the existing DB. Then you can add a new subscription DB.
 | 
			
		||||
{: .blue}
 | 
			
		||||
```
 | 
			
		||||
$ mongo
 | 
			
		||||
> use open5gs
 | 
			
		||||
switched to db open5gs
 | 
			
		||||
> db.subscribers.drop()
 | 
			
		||||
true
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
- **The New WebUI:** You have to log out using the old WebUI backend/frontend. Then, you can log back in again using the new WebUI backend/frontend.
 | 
			
		||||
{: .blue}
 | 
			
		||||
```
 | 
			
		||||
$ git checkout v2.1.7
 | 
			
		||||
$ cd webui
 | 
			
		||||
$ rm -Rf ./node_modules
 | 
			
		||||
$ npm ci --no-optional
 | 
			
		||||
$ npm run dev
 | 
			
		||||
 | 
			
		||||
## You should log out
 | 
			
		||||
 | 
			
		||||
$ git checkout main
 | 
			
		||||
$ cd webui
 | 
			
		||||
$ rm -Rf ./node_modules
 | 
			
		||||
$ npm ci --no-optional
 | 
			
		||||
$ npm run dev
 | 
			
		||||
 | 
			
		||||
## You can log back in
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
- freeDiameter version has changed from 1.3.2 to 1.5.0. If you want to compile the source code, you need to update meson subprojects as shown below.
 | 
			
		||||
{: .blue}
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
$ cd open5gs
 | 
			
		||||
$ git pull
 | 
			
		||||
$ meson subprojects update
 | 
			
		||||
$ cd build
 | 
			
		||||
$ ninja
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Or just use a clean github repository.
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
$ rm -Rf open5gs
 | 
			
		||||
$ git clone https://github.com/open5gs/open5gs
 | 
			
		||||
$ cd open5gs
 | 
			
		||||
$ meson build --prefix=`pwd`/install
 | 
			
		||||
$ cd build
 | 
			
		||||
$ ninja
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Download -- [v2.2.9.tar.gz](https://github.com/open5gs/open5gs/archive/v2.2.9.tar.gz)
 | 
			
		||||
{: .notice--info}
 | 
			
		||||
							
								
								
									
										27
									
								
								docs/_posts/2021-06-08-release-v2.3.0.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								docs/_posts/2021-06-08-release-v2.3.0.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,27 @@
 | 
			
		||||
---
 | 
			
		||||
title: "v2.3.0 - BSF Added in 5G Core"
 | 
			
		||||
date: 2021-06-08 21:37:00 +0900
 | 
			
		||||
categories:
 | 
			
		||||
  - Release
 | 
			
		||||
tags:
 | 
			
		||||
  - News
 | 
			
		||||
  - Release
 | 
			
		||||
head_inline: "<style> ul { padding-bottom: 1em; } .blue { color: blue; }</style>"
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
#### New Features
 | 
			
		||||
- [BSF] New NF is added ([commit-6119867](https://github.com/open5gs/open5gs/commit/fe89f7cd11d415ae89da2724fc67aa573efa83c3))
 | 
			
		||||
- [UPF] Support TAP interfaces with ARP/ND ([#1022](https://github.com/open5gs/open5gs/pull/1022)) -- [anarkiwi](https://github.com/anarkiwi)
 | 
			
		||||
 | 
			
		||||
#### Enhancement
 | 
			
		||||
- [ALL] Add more memory log ([commit-118d62d](https://github.com/open5gs/open5gs/commit/118d62d42df5037665b93698cfaa67d34a7519ec))
 | 
			
		||||
- [ALL] Add more error log ([commit-80a9497](https://github.com/open5gs/open5gs/commit/80a9497afdefe72e9deacbaa66ebc1c203de23ea))
 | 
			
		||||
 | 
			
		||||
#### Bug Fixes
 | 
			
		||||
- [SMF] Fix the crash bug ([#1034](https://github.com/open5gs/open5gs/issues/1034), [#1006](https://github.com/open5gs/open5gs/issues/1006)) -- [mcatalancid](https://github.com/mcatalancid), [ramonss](https://github.com/ramonss)
 | 
			
		||||
- [SBI] Fix the default SBI port number ([#1008](https://github.com/open5gs/open5gs/issues/1008), [#997](https://github.com/open5gs/open5gs/issues/997)) -- [mmailand](https://github.com/mmailand), [plutec](https://github.com/plutec)
 | 
			
		||||
- [SMF] Fix DRB lost issue when additional TFTs needs to be added to existing bearer with TFTs ([#1019](https://github.com/open5gs/open5gs/pull/1019)) -- [herlesupreeth](https://github.com/herlesupreeth)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Download -- [v2.3.0.tar.gz](https://github.com/open5gs/open5gs/archive/v2.3.0.tar.gz)
 | 
			
		||||
{: .notice--info}
 | 
			
		||||
							
								
								
									
										30
									
								
								docs/_posts/2021-06-29-release-v2.3.1.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								docs/_posts/2021-06-29-release-v2.3.1.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
			
		||||
---
 | 
			
		||||
title: "v2.3.1 - Support ePDG Interface"
 | 
			
		||||
date: 2021-06-29 22:13:00 +0900
 | 
			
		||||
categories:
 | 
			
		||||
  - Release
 | 
			
		||||
tags:
 | 
			
		||||
  - News
 | 
			
		||||
  - Release
 | 
			
		||||
head_inline: "<style> ul { padding-bottom: 1em; } .blue { color: blue; }</style>"
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
#### New Features
 | 
			
		||||
- [Non3GPP] Support ePDG Interface ([#1039](https://github.com/open5gs/open5gs/discussions/1039)) -- [herlesupreeth](https://github.com/herlesupreeth), [fasferraz](https://github.com/fasferraz)
 | 
			
		||||
 | 
			
		||||
#### Enhancement
 | 
			
		||||
- [GTP] Add Indication (Dual Address Bearer and Handover) ([#1049](https://github.com/open5gs/open5gs/pull/1049)) -- [medeiros405](https://github.com/medeiros405)
 | 
			
		||||
 | 
			
		||||
#### Bug Fixes
 | 
			
		||||
- [freeDiameter] Need to ASSERT on FD_LOG_FATAL ([#1069](https://github.com/open5gs/open5gs/pull/1069)) -- [spencersevilla](https://github.com/spencersevilla)
 | 
			
		||||
- [UPF] Trim buffer to correct size after creating ARP or ND reply ([#1068](https://github.com/open5gs/open5gs/pull/1068)) -- [anarkiwi](https://github.com/anarkiwi)
 | 
			
		||||
- [AMF] NG Setup Failure with proper cause "Slice not supported" ([#1064](https://github.com/open5gs/open5gs/issues/1064)) -- [irazairspan](https://github.com/irazairspan)
 | 
			
		||||
- [ALL] Increase the number of 1024-memory pool (1024 --> 2048) ([#1062](https://github.com/open5gs/open5gs/issues/1062)) -- [UmakantKulkarni](https://github.com/UmakantKulkarni)
 | 
			
		||||
- [AMF] fix the crash if 'ran_ue' context was removed ([#1061](https://github.com/open5gs/open5gs/issues/1061)) -- [aminssl](https://github.com/aminssl)
 | 
			
		||||
- [PCF] fix the crash if PEI is not avaiable ([#1059](https://github.com/open5gs/open5gs/issues/1059)) -- [Spectranis](https://github.com/Spectranis)
 | 
			
		||||
- [MME] fix the crash when release a UE ([#1058](https://github.com/open5gs/open5gs/issues/1058)) -- [duocpv89](https://github.com/duocpv89)
 | 
			
		||||
- [UPF] Need to 'continue' during matching rule ([#1052](https://github.com/open5gs/open5gs/pull/1052)) -- [spencersevilla](https://github.com/spencersevilla)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Download -- [v2.3.1.tar.gz](https://github.com/open5gs/open5gs/archive/v2.3.1.tar.gz)
 | 
			
		||||
{: .notice--info}
 | 
			
		||||
							
								
								
									
										24
									
								
								docs/_posts/2021-07-18-release-v2.3.2.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								docs/_posts/2021-07-18-release-v2.3.2.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,24 @@
 | 
			
		||||
---
 | 
			
		||||
title: "v2.3.2 - Upgrade SBI to r16.8.0-20210629"
 | 
			
		||||
date: 2021-07-18 20:28:00 +0900
 | 
			
		||||
categories:
 | 
			
		||||
  - Release
 | 
			
		||||
tags:
 | 
			
		||||
  - News
 | 
			
		||||
  - Release
 | 
			
		||||
head_inline: "<style> ul { padding-bottom: 1em; } .blue { color: blue; }</style>"
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
#### Enhancement
 | 
			
		||||
- [SBI] Add priority/capacity/load/AllowedNfTypes in NFProfile/NFService ([commit-039b9d0](https://github.com/open5gs/open5gs/commit/039b9d0aaa8849b27d5fee38e85bef9c4a895456))
 | 
			
		||||
- [SBI] Upgrade specification r16.8.0-20210629 with OpenAPI Geneartor 5.2.0 ([commit-f278d58](https://github.com/open5gs/open5gs/commit/f278d58a699e9b4d5ca0923bb2750a41cb62b0f7))
 | 
			
		||||
 | 
			
		||||
#### Bug Fixes
 | 
			
		||||
- Fix the bug when GTPv2 conflict between Delete Bearer Request and Downlink Data Notification ([#1095](https://github.com/open5gs/open5gs/issues/1095)) -- [herlesupreeth](https://github.com/herlesupreeth)
 | 
			
		||||
- Fix Vendor-Specific-Application-ID as Cx rather than SWx ([#1039](https://github.com/open5gs/open5gs/discussions/1039)) -- [herlesupreeth](https://github.com/herlesupreeth)
 | 
			
		||||
- Fix the bug for Real PCF unable to PATCH ([#1086](https://github.com/open5gs/open5gs/issues/1086)) -- [marcodoliveira](https://github.com/marcodoliveira)
 | 
			
		||||
- BSF mis-typo in Debian Package Name ([commit-2aaa820](https://github.com/open5gs/open5gs/commit/2aaa8200c2d0eaff675d165146e1457c1047e97a))
 | 
			
		||||
- fix the bug for making allowed NSSAI ([commit-65e96dd](https://github.com/open5gs/open5gs/commit/65e96dd75c72dfb780e297107a8f51db5e63ab8e))
 | 
			
		||||
 | 
			
		||||
Download -- [v2.3.2.tar.gz](https://github.com/open5gs/open5gs/archive/v2.3.2.tar.gz)
 | 
			
		||||
{: .notice--info}
 | 
			
		||||
							
								
								
									
										40
									
								
								docs/_posts/2021-10-16-release-v2.3.6.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								docs/_posts/2021-10-16-release-v2.3.6.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,40 @@
 | 
			
		||||
---
 | 
			
		||||
title: "v2.3.6 - Bug Fixes"
 | 
			
		||||
date: 2021-10-16 22:49:00 +0900
 | 
			
		||||
categories:
 | 
			
		||||
  - Release
 | 
			
		||||
tags:
 | 
			
		||||
  - News
 | 
			
		||||
  - Release
 | 
			
		||||
head_inline: "<style> ul { padding-bottom: 1em; } .blue { color: blue; }</style>"
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
#### Enhancement
 | 
			
		||||
- [PFCP] Support URR in PFCP protocol ([#1190](https://github.com/open5gs/open5gs/pull/1190)) -- [mhkndgn](https://github.com/mhkndgn)
 | 
			
		||||
- [MGMT] Improve open5gs-dbctl ([#1181](https://github.com/open5gs/open5gs/pull/1181)) -- [cgiraldo](https://github.com/cgiraldo)
 | 
			
		||||
- [SEC] Support of configuring authentication parameter(R1-R5)([#1153](https://github.com/open5gs/open5gs/issues/1153)) -- [Mozartor2](https://github.com/Mozartor2)
 | 
			
		||||
 | 
			
		||||
#### Bug Fixes
 | 
			
		||||
- [MME] Fix the GTP module crash after SGW-C restarts and Modify Bearer Request/Response ([#1205](https://github.com/open5gs/open5gs/issues/1205)) -- [cecrevier](https://github.com/cecrevier)
 | 
			
		||||
- [SMF/SGW-C] Add Vendor-Id in Supported-Features AVP in Gx ([#1202](https://github.com/open5gs/open5gs/issues/1202)) -- [oktavlachs](https://github.com/oktavlachs)
 | 
			
		||||
- [SMF/SGW-C] Expand Indications and Add Delay Value ([#1201](https://github.com/open5gs/open5gs/issues/1201)) -- [cbrasho](https://github.com/cbrasho)
 | 
			
		||||
- [MME/AMF] Fix the NAS module crash when APN lenth is zero([#1199](https://github.com/open5gs/open5gs/discussions/1199)) -- [ipinfotelecom](https://github.com/ipinfotelecom)
 | 
			
		||||
- [UPF] Remove Diameter dependencies from UPF ([#1193](https://github.com/open5gs/open5gs/pull/1193)) -- [spencersevilla](https://github.com/spencersevilla)
 | 
			
		||||
- [CVE-2021-41794] Stack overflow in ogs_fqdn_parse() -- [13f1b390](https://github.com/open5gs/open5gs/commit/13f1b390ae96b02115932b1548b3768e6903e344)
 | 
			
		||||
- [SGW-C] fix the SGW-C crash in Delete Session process when UPF was restarted ([#1177](https://github.com/open5gs/open5gs/issues/1177)) -- [kuanghanqian](https://github.com/kuanghanqian)
 | 
			
		||||
- [SMF] Add GTP-U Extension Header Deletion field -- [9c589ac](https://github.com/open5gs/open5gs/commit/9c589ac584cb7d53a32ceb23c818ee1a00124bb0)
 | 
			
		||||
- [SMF] Consider after airplain-mode if UE does not send PDU session complete message ([#1155](https://github.com/open5gs/open5gs/issues/1155)) -- [wanfude](https://github.com/wanfude)
 | 
			
		||||
- [SMF] fix the crash when BSF is not running ([#1149](https://github.com/open5gs/open5gs/issues/1149)) -- [inkms](https://github.com/inkms)
 | 
			
		||||
- [SMF] TAI/ECGI is not required in WLAN([#1039](https://github.com/open5gs/open5gs/discussions/1039)) -- [fasferraz](https://github.com/fasferraz)
 | 
			
		||||
- [MEM] Increase Cluster2048 pool from 512 to 1024 ([#1143](https://github.com/open5gs/open5gs/pull/1143)) -- [UmakantKulkarni](https://github.com/UmakantKulkarni)
 | 
			
		||||
- [MME/AMF] Use Non-UE signalling connection when S1-Paging message ([#1134](https://github.com/open5gs/open5gs/issues/1134)) -- [RafalArciszewski](https://github.com/RafalArciszewski)
 | 
			
		||||
- [SGW-C] Fixes the shared object error ([#595](https://github.com/open5gs/open5gs/issues/595)) -- [RafalArciszewski](https://github.com/RafalArciszewski)
 | 
			
		||||
- [SMF] Configuration update for clarifying FALLBACK SUBNET ([#1128](https://github.com/open5gs/open5gs/issues/1128)) -- [kbarlee](https://github.com/kbarlee)
 | 
			
		||||
- [AMF] Fixes an invalid GSM reject in DL NAS Transport ([aligungr#375](https://github.com/aligungr/UERANSIM/issues/375)) -- [infinitydon] (https://github.com/infinitydon)
 | 
			
		||||
- [MME/AMF] Fixes the crash if eNB context is released and timer is expred ([#1122](https://github.com/open5gs/open5gs/issues/1122)) -- [SpeedFI-101](https://github.com/SpeedFI-101)
 | 
			
		||||
- [PCF] 'NULL' events on successful N5 (npcf) request ([#1120](https://github.com/open5gs/open5gs/issues/1120)) -- [oktavlachs](https://github.com/oktavlachs)
 | 
			
		||||
- [SMF/PCRF] Fixes the crash when number of flow > 8 ([#1108](https://github.com/open5gs/open5gs/pull/1108)) -- [herlesupreeth](https://github.com/herlesupreeth)
 | 
			
		||||
- [SMF] Session data was accessed when NULL resulting in crash ([#1105](https://github.com/open5gs/open5gs/pull/1105)) -- [herlesupreeth](https://github.com/herlesupreeth)
 | 
			
		||||
 | 
			
		||||
Download -- [v2.3.6.tar.gz](https://github.com/open5gs/open5gs/archive/v2.3.6.tar.gz)
 | 
			
		||||
{: .notice--info}
 | 
			
		||||
							
								
								
									
										45
									
								
								docs/_posts/2021-12-11-release-v2.4.0.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								docs/_posts/2021-12-11-release-v2.4.0.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,45 @@
 | 
			
		||||
---
 | 
			
		||||
title: "v2.4.0 - VoNR Implemented But Not Tested"
 | 
			
		||||
date: 2021-12-11 22:27:00 +0900
 | 
			
		||||
categories:
 | 
			
		||||
  - Release
 | 
			
		||||
tags:
 | 
			
		||||
  - News
 | 
			
		||||
  - Release
 | 
			
		||||
head_inline: "<style> ul { padding-bottom: 1em; } .blue { color: blue; }</style>"
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
#### New Feature
 | 
			
		||||
- VoNR added ([0fb8279](https://github.com/open5gs/open5gs/commit/0fb8279e3665d722d750b8e154fe34ad19905f76))
 | 
			
		||||
 | 
			
		||||
#### Security
 | 
			
		||||
- fix the buffer overflow ([CVE-2021-41794](https://nvd.nist.gov/vuln/detail/CVE-2021-41794))
 | 
			
		||||
 | 
			
		||||
#### Modification
 | 
			
		||||
- [MME] Change CAUSE(11) in Attach reject for foreign IMSI ([#1281](https://github.com/open5gs/open5gs/pull/1281)) -- [kbarlee](https://github.com/kbarlee)
 | 
			
		||||
- [AMF] Added AMF-initiated AM Policy Termination ([a5a5c42](https://github.com/open5gs/open5gs/commit/a5a5c424c1b99eca8147ea8532dc957b24affb1c))
 | 
			
		||||
- [IPv6] Change Address from fe80::X@lo to fd69:f21d:873c:fa::X ([#1250](https://github.com/open5gs/open5gs/issues/1250)) -- [rupeshmore470](https://github.com/rupeshmore470)
 | 
			
		||||
- [UPF] Remove ogs_link_local_addr_by_dev() ([#1217](https://github.com/open5gs/open5gs/issues/1217)) -- [shuimoshusheng](https://github.com/shuimoshusheng)
 | 
			
		||||
- [WebUI] Now, WebUI uses localhost by default ([#764](https://github.com/open5gs/open5gs/issues/764), [#587](https://github.com/open5gs/open5gs/pull/587))
 | 
			
		||||
 | 
			
		||||
#### Bug Fixes
 | 
			
		||||
- [SMF] Fix the crash when PDU setup/release interact ([#1280](https://github.com/open5gs/open5gs/issues/1280)) -- [micjerry](https://github.com/micjerry)
 | 
			
		||||
- [MME] Before removing enb_ue, all timers must be stopped to prevent retransmission of NAS message ([#1275](https://github.com/open5gs/open5gs/issues/1275)) -- [mmonka](https://github.com/mmonka)
 | 
			
		||||
- [MME] fix the crash when PDN mismatch between UE and HSS ([#1263](https://github.com/open5gs/open5gs/issues/1263)) -- [kbarlee](https://github.com/kbarlee)
 | 
			
		||||
- [BSF] Fix the BSF bug when two PDU session release ([#1272](https://github.com/open5gs/open5gs/pull/1272)) -- [DendoD96](https://github.com/DendoD96)
 | 
			
		||||
- [AMF/MME] Fix the crash during Reset message ([#1268](https://github.com/open5gs/open5gs/issues/1268)) -- [micjerry](https://github.com/micjerry)
 | 
			
		||||
- [5GC] Fix the race condition between UE/Network-triggered Service Request ([#1226](https://github.com/open5gs/open5gs/issues/1226)) -- [micjerry](https://github.com/micjerry)
 | 
			
		||||
- [AMF] To avoid GTP error indication, UPF should be deactivated ([#1238](https://github.com/open5gs/open5gs/issues/1238)) -- [rupeshmore470](https://github.com/rupeshmore470)
 | 
			
		||||
- [AMF] Null pointer dereference - n2InfoContent->ngap_ie_type ([#1247](https://github.com/open5gs/open5gs/issues/1247)) -- [leommxj](https://github.com/leommxj)
 | 
			
		||||
- [AMF] Memory corruption - Overflow num_of_part in SBI message ([#1247](https://github.com/open5gs/open5gs/issues/1247)) -- [leommxj](https://github.com/leommxj)
 | 
			
		||||
- [AMF/MME] We should stop timer for InitialContextSetupFailure ([#1242](https://github.com/open5gs/open5gs/issues/1242)) -- [micjerry](https://github.com/micjerry)
 | 
			
		||||
- [MME] This bug occurs when SGW-C restarts and the next GTP signal occurs between MME and SGW-C ([#1205](https://github.com/open5gs/open5gs/issues/1205)) -- [cecrevier](https://github.com/cecrevier)
 | 
			
		||||
- [MME] In Authentication-EMM State and eNB-disconnected, MME could be crashed ([#1205](https://github.com/open5gs/open5gs/issues/1205)) -- [cecrevier](https://github.com/cecrevier)
 | 
			
		||||
- [DBCTL] Add skipped space before $DB_URI ([#1218](https://github.com/open5gs/open5gs/pull/1218)) -- [EugeneBogush](https://github.com/EugeneBogush)
 | 
			
		||||
- [GTP/PFCP] Add explicit 3GPP paragraph name as comments at generation time ([#1215](https://github.com/open5gs/open5gs/pull/1215)) -- [cbalint13](https://github.com/cbalint13)
 | 
			
		||||
- [Meson] 0.60 build error since target has a path segment like ../dict_dcca_3gpp ([#1213](https://github.com/open5gs/open5gs/issues/1213)) -- [osmith42](https://github.com/osmith42)
 | 
			
		||||
- [SGW-C] Fix Create Bearer Request - Use instance 2 instead of 1 ([#1201](https://github.com/open5gs/open5gs/issues/1201), [#1212](https://github.com/open5gs/open5gs/pull/1212)) -- [cbalint13](https://github.com/cbalint13), [cbrasho](https://github.com/cbrasho)
 | 
			
		||||
- [AMF] Fix the crash when long MSIN length ([#1206](https://github.com/open5gs/open5gs/issues/1206)) -- [yblog123](https://github.com/yblog123)
 | 
			
		||||
 | 
			
		||||
Download -- [v2.4.0.tar.gz](https://github.com/open5gs/open5gs/archive/v2.4.0.tar.gz)
 | 
			
		||||
{: .notice--info}
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							@@ -4,13 +4,13 @@
 | 
			
		||||
#
 | 
			
		||||
# Run as root or insert `sudo -E` before `bash`:
 | 
			
		||||
#
 | 
			
		||||
# curl -sL http://open5gs.org/static/setup_3.x | bash -
 | 
			
		||||
# curl -fsSL https://open5gs.org/open5gs/assets/webui/install | sudo -E bash -
 | 
			
		||||
#   or
 | 
			
		||||
# wget -qO- http://open5gs.org/static/setup_3.x | bash -
 | 
			
		||||
# wget -qO- https://open5gs.org/open5gs/assets/webui/install | sudo -E bash -
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
PACKAGE="open5gs"
 | 
			
		||||
VERSION="2.2.6"
 | 
			
		||||
VERSION="2.2.8"
 | 
			
		||||
 | 
			
		||||
print_status() {
 | 
			
		||||
    echo
 | 
			
		||||
@@ -68,16 +68,28 @@ exec_cmd() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
uninstall() {
 | 
			
		||||
exec_cmd_nobail "deb-systemd-invoke stop open5gs-webui"
 | 
			
		||||
exec_cmd_nobail "systemctl disable open5gs-webui"
 | 
			
		||||
exec_cmd_nobail "rm -f /lib/systemd/system/${PACKAGE}-webui.service"
 | 
			
		||||
exec_cmd_nobail "systemctl daemon-reload"
 | 
			
		||||
if [ -f /lib/systemd/system/${PACKAGE}-webui.service ]; then
 | 
			
		||||
    STATUS="$(systemctl is-active open5gs-webui.service)"
 | 
			
		||||
    if [ "${STATUS}" = "active" ]; then
 | 
			
		||||
        exec_cmd_nobail "deb-systemd-invoke stop open5gs-webui"
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    STATUS="$(systemctl is-enabled open5gs-webui.service)"
 | 
			
		||||
    if [ "${STATUS}" = "enabled" ]; then
 | 
			
		||||
        exec_cmd_nobail "systemctl disable open5gs-webui"
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    exec_cmd_nobail "rm -f /lib/systemd/system/${PACKAGE}-webui.service"
 | 
			
		||||
    exec_cmd_nobail "systemctl daemon-reload"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ -d /usr/lib/node_modules/${PACKAGE} ]; then
 | 
			
		||||
    exec_cmd_nobail "rm -rf /usr/lib/node_modules/${PACKAGE}"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
exec_cmd "rm -rf ./${PACKAGE}-${VERSION}"
 | 
			
		||||
exec_cmd "rm -rf /usr/lib/node_modules/${PACKAGE}"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
setup() {
 | 
			
		||||
preinstall() {
 | 
			
		||||
 | 
			
		||||
PRE_INSTALL_PKGS=""
 | 
			
		||||
 | 
			
		||||
@@ -259,6 +271,23 @@ exec_cmd "deb-systemd-invoke start open5gs-webui"
 | 
			
		||||
exec_cmd "rm -rf ./${PACKAGE}-${VERSION}"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
postinstall() {
 | 
			
		||||
 | 
			
		||||
print_status "Default Administrator Account [Username:admin, Password:1423]..."
 | 
			
		||||
 | 
			
		||||
exec_cmd "cat << EOF > ./account.js
 | 
			
		||||
db = db.getSiblingDB('open5gs')
 | 
			
		||||
cursor = db.accounts.find()
 | 
			
		||||
if ( cursor.count() == 0 ) {
 | 
			
		||||
    db.accounts.insert({ salt: 'f5c15fa72622d62b6b790aa8569b9339729801ab8bda5d13997b5db6bfc1d997', hash: '402223057db5194899d2e082aeb0802f6794622e1cbc47529c419e5a603f2cc592074b4f3323b239ffa594c8b756d5c70a4e1f6ecd3f9f0d2d7328c4cf8b1b766514effff0350a90b89e21eac54cd4497a169c0c7554a0e2cd9b672e5414c323f76b8559bc768cba11cad2ea3ae704fb36abc8abc2619231ff84ded60063c6e1554a9777a4a464ef9cfdfa90ecfdacc9844e0e3b2f91b59d9ff024aec4ea1f51b703a31cda9afb1cc2c719a09cee4f9852ba3cf9f07159b1ccf8133924f74df770b1a391c19e8d67ffdcbbef4084a3277e93f55ac60d80338172b2a7b3f29cfe8a36738681794f7ccbe9bc98f8cdeded02f8a4cd0d4b54e1d6ba3d11792ee0ae8801213691848e9c5338e39485816bb0f734b775ac89f454ef90992003511aa8cceed58a3ac2c3814f14afaaed39cbaf4e2719d7213f81665564eec02f60ede838212555873ef742f6666cc66883dcb8281715d5c762fb236d72b770257e7e8d86c122bb69028a34cf1ed93bb973b440fa89a23604cd3fefe85fbd7f55c9b71acf6ad167228c79513f5cfe899a2e2cc498feb6d2d2f07354a17ba74cecfbda3e87d57b147e17dcc7f4c52b802a8e77f28d255a6712dcdc1519e6ac9ec593270bfcf4c395e2531a271a841b1adefb8516a07136b0de47c7fd534601b16f0f7a98f1dbd31795feb97da59e1d23c08461cf37d6f2877d0f2e437f07e25015960f63', username: 'admin', roles: [ 'admin' ], "__v" : 0})
 | 
			
		||||
}
 | 
			
		||||
EOF"
 | 
			
		||||
exec_cmd "mongo open5gs ./account.js"
 | 
			
		||||
exec_cmd "rm -f ./account.js"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
## Defer setup until we have the complete script
 | 
			
		||||
setup
 | 
			
		||||
uninstall
 | 
			
		||||
preinstall
 | 
			
		||||
install
 | 
			
		||||
postinstall
 | 
			
		||||
 
 | 
			
		||||
@@ -4,9 +4,9 @@
 | 
			
		||||
#
 | 
			
		||||
# Run as root or insert `sudo -E` before `bash`:
 | 
			
		||||
#
 | 
			
		||||
# curl -sL http://open5gs.org/static/uninstall_webui.sh | bash -
 | 
			
		||||
# curl -fsSL https://open5gs.org/open5gs/assets/webui/uninstall | sudo -E bash -
 | 
			
		||||
#   or
 | 
			
		||||
# wget -qO- http://open5gs.org/static/uninstall_webui.shx | bash -
 | 
			
		||||
# wget -qO- https://open5gs.org/open5gs/assets/webui/uninstall | sudo -E bash -
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
exec_cmd_nobail() {
 | 
			
		||||
 
 | 
			
		||||
@@ -81,6 +81,9 @@ void pcf_terminate(void);
 | 
			
		||||
int nssf_initialize(void);
 | 
			
		||||
void nssf_terminate(void);
 | 
			
		||||
 | 
			
		||||
int bsf_initialize(void);
 | 
			
		||||
void bsf_terminate(void);
 | 
			
		||||
 | 
			
		||||
int upf_initialize(void);
 | 
			
		||||
void upf_terminate(void);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -332,6 +332,9 @@ int ogs_app_context_parse_config(void)
 | 
			
		||||
                } else if (!strcmp(parameter_key, "no_nssf")) {
 | 
			
		||||
                    self.parameter.no_nssf =
 | 
			
		||||
                        ogs_yaml_iter_bool(¶meter_iter);
 | 
			
		||||
                } else if (!strcmp(parameter_key, "no_bsf")) {
 | 
			
		||||
                    self.parameter.no_bsf =
 | 
			
		||||
                        ogs_yaml_iter_bool(¶meter_iter);
 | 
			
		||||
                } else if (!strcmp(parameter_key, "no_udr")) {
 | 
			
		||||
                    self.parameter.no_udr =
 | 
			
		||||
                        ogs_yaml_iter_bool(¶meter_iter);
 | 
			
		||||
 
 | 
			
		||||
@@ -64,6 +64,7 @@ typedef struct ogs_app_context_s {
 | 
			
		||||
        int no_udm;
 | 
			
		||||
        int no_pcf;
 | 
			
		||||
        int no_nssf;
 | 
			
		||||
        int no_bsf;
 | 
			
		||||
        int no_udr;
 | 
			
		||||
        int no_nrf;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -41,9 +41,9 @@ int get_asn1c_environment_version(void);	/* Run-time version */
 | 
			
		||||
#define	FREEMEM(ptr)		free(ptr)
 | 
			
		||||
#else
 | 
			
		||||
#include "ogs-core.h"
 | 
			
		||||
#define        CALLOC(nmemb, size)     ogs_calloc(nmemb, size)
 | 
			
		||||
#define        MALLOC(size)            ogs_malloc(size)
 | 
			
		||||
#define        REALLOC(oldptr, size)   ogs_realloc(oldptr, size)
 | 
			
		||||
#define        CALLOC(nmemb, size)     ogs_calloc_or_assert(nmemb, size)
 | 
			
		||||
#define        MALLOC(size)            ogs_malloc_or_assert(size)
 | 
			
		||||
#define        REALLOC(oldptr, size)   ogs_realloc_or_assert(oldptr, size)
 | 
			
		||||
#define        FREEMEM(ptr)            ogs_free(ptr)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -46,7 +46,11 @@ NGAP_AMFNameUTF8String_constraint(const asn_TYPE_descriptor_t *td, const void *s
 | 
			
		||||
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
 | 
			
		||||
asn_per_constraints_t asn_PER_type_NGAP_AMFNameUTF8String_constr_1 CC_NOTUSED = {
 | 
			
		||||
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
 | 
			
		||||
#if 0 /* modified by acetcom */
 | 
			
		||||
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
 | 
			
		||||
#else
 | 
			
		||||
	{ APC_CONSTRAINED | APC_EXTENSIBLE,  8,  8,  1,  150 }	/* (SIZE(1..150,...)) */,
 | 
			
		||||
#endif
 | 
			
		||||
	0, 0	/* No PER value map */
 | 
			
		||||
};
 | 
			
		||||
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
 | 
			
		||||
 
 | 
			
		||||
@@ -46,7 +46,11 @@ NGAP_RANNodeNameUTF8String_constraint(const asn_TYPE_descriptor_t *td, const voi
 | 
			
		||||
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
 | 
			
		||||
asn_per_constraints_t asn_PER_type_NGAP_RANNodeNameUTF8String_constr_1 CC_NOTUSED = {
 | 
			
		||||
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
 | 
			
		||||
#if 0 /* modified by acetcom */
 | 
			
		||||
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
 | 
			
		||||
#else
 | 
			
		||||
	{ APC_CONSTRAINED | APC_EXTENSIBLE,  8,  8,  1,  150 }	/* (SIZE(1..150,...)) */,
 | 
			
		||||
#endif
 | 
			
		||||
	0, 0	/* No PER value map */
 | 
			
		||||
};
 | 
			
		||||
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
 | 
			
		||||
 
 | 
			
		||||
@@ -116,6 +116,40 @@ index 67ad9db5..1adbdde6 100644
 | 
			
		||||
                return per_put_few_bits(po, length-1, 7) ? -1 : 0;
 | 
			
		||||
        } else {
 | 
			
		||||
 | 
			
		||||
Fix NGAP_RANNodeNameUTF8String.c/NGAP_AMFNameUTF8String.c
 | 
			
		||||
===========================================
 | 
			
		||||
diff --git a/lib/asn1c/ngap/NGAP_RANNodeNameUTF8String.c b/lib/asn1c/ngap/NGAP_RANNodeNameUTF8String.c
 | 
			
		||||
index 9e469f7f..79ebd028 100644
 | 
			
		||||
--- a/lib/asn1c/ngap/NGAP_RANNodeNameUTF8String.c
 | 
			
		||||
+++ b/lib/asn1c/ngap/NGAP_RANNodeNameUTF8String.c
 | 
			
		||||
@@ -46,7 +46,11 @@ NGAP_RANNodeNameUTF8String_constraint(const asn_TYPE_descriptor_t *td, const voi
 | 
			
		||||
 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
 | 
			
		||||
 asn_per_constraints_t asn_PER_type_NGAP_RANNodeNameUTF8String_constr_1 CC_NOTUSED = {
 | 
			
		||||
        { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
 | 
			
		||||
+#if 0 /* modified by acetcom */
 | 
			
		||||
        { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
 | 
			
		||||
+#else
 | 
			
		||||
+       { APC_CONSTRAINED | APC_EXTENSIBLE,  8,  8,  1,  150 }  /* (SIZE(1..150,...)) */,
 | 
			
		||||
+#endif
 | 
			
		||||
        0, 0    /* No PER value map */
 | 
			
		||||
 };
 | 
			
		||||
 #endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
 | 
			
		||||
diff --git a/lib/asn1c/ngap/NGAP_AMFNameUTF8String.c b/lib/asn1c/ngap/NGAP_AMFNameUTF8String.c
 | 
			
		||||
index 1df33a4d..a74f97ea 100644
 | 
			
		||||
--- a/lib/asn1c/ngap/NGAP_AMFNameUTF8String.c
 | 
			
		||||
+++ b/lib/asn1c/ngap/NGAP_AMFNameUTF8String.c
 | 
			
		||||
@@ -46,7 +46,11 @@ NGAP_AMFNameUTF8String_constraint(const asn_TYPE_descriptor_t *td, const void *s
 | 
			
		||||
 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
 | 
			
		||||
 asn_per_constraints_t asn_PER_type_NGAP_AMFNameUTF8String_constr_1 CC_NOTUSED = {
 | 
			
		||||
        { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
 | 
			
		||||
+#if 0 /* modified by acetcom */
 | 
			
		||||
        { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
 | 
			
		||||
+#else
 | 
			
		||||
+       { APC_CONSTRAINED | APC_EXTENSIBLE,  8,  8,  1,  150 }  /* (SIZE(1..150,...)) */,
 | 
			
		||||
+#endif
 | 
			
		||||
        0, 0    /* No PER value map */
 | 
			
		||||
 };
 | 
			
		||||
 #endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
 | 
			
		||||
 | 
			
		||||
Fix NGAP_ProtocolExtensionField.c
 | 
			
		||||
===========================================
 | 
			
		||||
 
 | 
			
		||||
@@ -28,7 +28,7 @@ ogs_pkbuf_t *ogs_asn_encode(const asn_TYPE_descriptor_t *td, void *sptr)
 | 
			
		||||
    ogs_assert(sptr);
 | 
			
		||||
 | 
			
		||||
    pkbuf = ogs_pkbuf_alloc(NULL, OGS_MAX_SDU_LEN);
 | 
			
		||||
    ogs_assert(pkbuf);
 | 
			
		||||
    ogs_expect_or_return_val(pkbuf, NULL);
 | 
			
		||||
    ogs_pkbuf_put(pkbuf, OGS_MAX_SDU_LEN);
 | 
			
		||||
 | 
			
		||||
    enc_ret = aper_encode_to_buffer(td, NULL,
 | 
			
		||||
 
 | 
			
		||||
@@ -64,6 +64,29 @@ void *ogs_plmn_id_build(ogs_plmn_id_t *plmn_id,
 | 
			
		||||
    return plmn_id;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void *ogs_nas_from_plmn_id(
 | 
			
		||||
        ogs_nas_plmn_id_t *ogs_nas_plmn_id, ogs_plmn_id_t *plmn_id)
 | 
			
		||||
{
 | 
			
		||||
    memcpy(ogs_nas_plmn_id, plmn_id, OGS_PLMN_ID_LEN);
 | 
			
		||||
    if (plmn_id->mnc1 != 0xf) {
 | 
			
		||||
        ogs_nas_plmn_id->mnc1 = plmn_id->mnc1;
 | 
			
		||||
        ogs_nas_plmn_id->mnc2 = plmn_id->mnc2;
 | 
			
		||||
        ogs_nas_plmn_id->mnc3 = plmn_id->mnc3;
 | 
			
		||||
    }
 | 
			
		||||
    return ogs_nas_plmn_id;
 | 
			
		||||
}
 | 
			
		||||
void *ogs_nas_to_plmn_id(
 | 
			
		||||
        ogs_plmn_id_t *plmn_id, ogs_nas_plmn_id_t *ogs_nas_plmn_id)
 | 
			
		||||
{
 | 
			
		||||
    memcpy(plmn_id, ogs_nas_plmn_id, OGS_PLMN_ID_LEN);
 | 
			
		||||
    if (plmn_id->mnc1 != 0xf) {
 | 
			
		||||
        plmn_id->mnc1 = ogs_nas_plmn_id->mnc1;
 | 
			
		||||
        plmn_id->mnc2 = ogs_nas_plmn_id->mnc2;
 | 
			
		||||
        plmn_id->mnc3 = ogs_nas_plmn_id->mnc3;
 | 
			
		||||
    }
 | 
			
		||||
    return plmn_id;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
char *ogs_serving_network_name_from_plmn_id(ogs_plmn_id_t *plmn_id)
 | 
			
		||||
{
 | 
			
		||||
    ogs_assert(plmn_id);
 | 
			
		||||
@@ -137,7 +160,7 @@ char *ogs_amf_id_to_string(ogs_amf_id_t *amf_id)
 | 
			
		||||
    ogs_assert(amf_id);
 | 
			
		||||
 | 
			
		||||
    str = ogs_calloc(1, OGS_AMFIDSTRLEN);
 | 
			
		||||
    ogs_assert(str);
 | 
			
		||||
    ogs_expect_or_return_val(str, NULL);
 | 
			
		||||
 | 
			
		||||
    ogs_hex_to_ascii(amf_id, sizeof(ogs_amf_id_t), str, OGS_AMFIDSTRLEN);
 | 
			
		||||
 | 
			
		||||
@@ -182,6 +205,7 @@ char *ogs_supi_from_suci(char *suci)
 | 
			
		||||
 | 
			
		||||
    ogs_assert(suci);
 | 
			
		||||
    tmp = ogs_strdup(suci);
 | 
			
		||||
    ogs_expect_or_return_val(tmp, NULL);
 | 
			
		||||
 | 
			
		||||
    p = strtok_r(tmp, "-", &saveptr);
 | 
			
		||||
 | 
			
		||||
@@ -222,10 +246,12 @@ char *ogs_id_get_type(char *str)
 | 
			
		||||
 | 
			
		||||
    ogs_assert(str);
 | 
			
		||||
    tmp = ogs_strdup(str);
 | 
			
		||||
    ogs_expect_or_return_val(tmp, NULL);
 | 
			
		||||
 | 
			
		||||
    p = strtok_r(tmp, "-", &saveptr);
 | 
			
		||||
    ogs_assert(p);
 | 
			
		||||
    type = ogs_strdup(p);
 | 
			
		||||
    ogs_expect_or_return_val(type, NULL);
 | 
			
		||||
 | 
			
		||||
    ogs_free(tmp);
 | 
			
		||||
    return type;
 | 
			
		||||
@@ -239,12 +265,14 @@ char *ogs_id_get_value(char *str)
 | 
			
		||||
 | 
			
		||||
    ogs_assert(str);
 | 
			
		||||
    tmp = ogs_strdup(str);
 | 
			
		||||
    ogs_expect_or_return_val(tmp, NULL);
 | 
			
		||||
 | 
			
		||||
    p = strtok_r(tmp, "-", &saveptr);
 | 
			
		||||
    ogs_assert(p);
 | 
			
		||||
    p = strtok_r(NULL, "-", &saveptr);
 | 
			
		||||
    ogs_assert(p);
 | 
			
		||||
    ueid = ogs_strdup(p);
 | 
			
		||||
    ogs_expect_or_return_val(ueid, NULL);
 | 
			
		||||
 | 
			
		||||
    ogs_free(tmp);
 | 
			
		||||
    return ueid;
 | 
			
		||||
@@ -252,10 +280,15 @@ char *ogs_id_get_value(char *str)
 | 
			
		||||
 | 
			
		||||
char *ogs_s_nssai_sd_to_string(ogs_uint24_t sd)
 | 
			
		||||
{
 | 
			
		||||
    char *string = NULL;
 | 
			
		||||
 | 
			
		||||
    if (sd.v == OGS_S_NSSAI_NO_SD_VALUE)
 | 
			
		||||
        return NULL;
 | 
			
		||||
 | 
			
		||||
    return ogs_uint24_to_0string(sd);
 | 
			
		||||
    string = ogs_uint24_to_0string(sd);
 | 
			
		||||
    ogs_expect(string);
 | 
			
		||||
 | 
			
		||||
    return string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ogs_uint24_t ogs_s_nssai_sd_from_string(const char *hex)
 | 
			
		||||
@@ -291,8 +324,13 @@ int ogs_fqdn_parse(char *dst, char *src, int length)
 | 
			
		||||
    int i = 0, j = 0;
 | 
			
		||||
    uint8_t len = 0;
 | 
			
		||||
 | 
			
		||||
    do {
 | 
			
		||||
    while (i < length) {
 | 
			
		||||
        len = src[i++];
 | 
			
		||||
        if ((j + len + 1) > length) {
 | 
			
		||||
            ogs_error("Invalid APN encoding[len:%d] + 1 > length[%d]",
 | 
			
		||||
                    len, length);
 | 
			
		||||
            return 0;
 | 
			
		||||
        }
 | 
			
		||||
        memcpy(&dst[j], &src[i], len);
 | 
			
		||||
 | 
			
		||||
        i += len;
 | 
			
		||||
@@ -302,7 +340,7 @@ int ogs_fqdn_parse(char *dst, char *src, int length)
 | 
			
		||||
            dst[j++] = '.';
 | 
			
		||||
        else
 | 
			
		||||
            dst[j] = 0;
 | 
			
		||||
    } while (i < length);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return j;
 | 
			
		||||
}
 | 
			
		||||
@@ -391,12 +429,12 @@ int ogs_ip_to_sockaddr(ogs_ip_t *ip, uint16_t port, ogs_sockaddr_t **list)
 | 
			
		||||
    ogs_assert(list);
 | 
			
		||||
 | 
			
		||||
    addr = ogs_calloc(1, sizeof(ogs_sockaddr_t));
 | 
			
		||||
    ogs_assert(addr);
 | 
			
		||||
    ogs_expect_or_return_val(addr, OGS_ERROR);
 | 
			
		||||
    addr->ogs_sa_family = AF_INET;
 | 
			
		||||
    addr->ogs_sin_port = htobe16(port);
 | 
			
		||||
 | 
			
		||||
    addr6 = ogs_calloc(1, sizeof(ogs_sockaddr_t));
 | 
			
		||||
    ogs_assert(addr6);
 | 
			
		||||
    ogs_expect_or_return_val(addr6, OGS_ERROR);
 | 
			
		||||
    addr6->ogs_sa_family = AF_INET6;
 | 
			
		||||
    addr6->ogs_sin_port = htobe16(port);
 | 
			
		||||
 | 
			
		||||
@@ -457,22 +495,112 @@ char *ogs_ipv4_to_string(uint32_t addr)
 | 
			
		||||
    char *buf = NULL;
 | 
			
		||||
 | 
			
		||||
    buf = ogs_calloc(1, OGS_ADDRSTRLEN);
 | 
			
		||||
    ogs_assert(buf);
 | 
			
		||||
    ogs_expect_or_return_val(buf, NULL);
 | 
			
		||||
 | 
			
		||||
    return (char*)OGS_INET_NTOP(&addr, buf);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
char *ogs_ipv6_to_string(uint8_t *addr6)
 | 
			
		||||
char *ogs_ipv6addr_to_string(uint8_t *addr6)
 | 
			
		||||
{
 | 
			
		||||
    char *buf = NULL;
 | 
			
		||||
    ogs_assert(addr6);
 | 
			
		||||
 | 
			
		||||
    buf = ogs_calloc(1, OGS_ADDRSTRLEN);
 | 
			
		||||
    ogs_assert(buf);
 | 
			
		||||
    ogs_expect_or_return_val(buf, NULL);
 | 
			
		||||
 | 
			
		||||
    return (char *)OGS_INET6_NTOP(addr6, buf);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
char *ogs_ipv6prefix_to_string(uint8_t *addr6, uint8_t prefixlen)
 | 
			
		||||
{
 | 
			
		||||
    char *buf = NULL;
 | 
			
		||||
    uint8_t tmp[OGS_IPV6_LEN];
 | 
			
		||||
    ogs_assert(addr6);
 | 
			
		||||
 | 
			
		||||
    memset(tmp, 0, OGS_IPV6_LEN);
 | 
			
		||||
    memcpy(tmp, addr6, prefixlen >> 3);
 | 
			
		||||
 | 
			
		||||
    buf = ogs_calloc(1, OGS_ADDRSTRLEN);
 | 
			
		||||
    ogs_expect_or_return_val(buf, NULL);
 | 
			
		||||
 | 
			
		||||
    if (OGS_INET6_NTOP(tmp, buf) == NULL) {
 | 
			
		||||
        ogs_fatal("Invalid IPv6 address");
 | 
			
		||||
        ogs_log_hexdump(OGS_LOG_FATAL, addr6, OGS_IPV6_LEN);
 | 
			
		||||
        ogs_assert_if_reached();
 | 
			
		||||
    }
 | 
			
		||||
    return ogs_mstrcatf(buf, "/%d", prefixlen);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int ogs_ipv4_from_string(uint32_t *addr, char *string)
 | 
			
		||||
{
 | 
			
		||||
    int rv;
 | 
			
		||||
    ogs_sockaddr_t tmp;
 | 
			
		||||
 | 
			
		||||
    ogs_assert(addr);
 | 
			
		||||
    ogs_assert(string);
 | 
			
		||||
 | 
			
		||||
    rv = ogs_inet_pton(AF_INET, string, &tmp);
 | 
			
		||||
    if (rv != OGS_OK) {
 | 
			
		||||
        ogs_error("Invalid IPv4 string = %s", string);
 | 
			
		||||
        return OGS_ERROR;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    *addr = tmp.sin.sin_addr.s_addr;
 | 
			
		||||
 | 
			
		||||
    return OGS_OK;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int ogs_ipv6addr_from_string(uint8_t *addr6, char *string)
 | 
			
		||||
{
 | 
			
		||||
    int rv;
 | 
			
		||||
    ogs_sockaddr_t tmp;
 | 
			
		||||
 | 
			
		||||
    ogs_assert(addr6);
 | 
			
		||||
    ogs_assert(string);
 | 
			
		||||
 | 
			
		||||
    rv = ogs_inet_pton(AF_INET6, string, &tmp);
 | 
			
		||||
    if (rv != OGS_OK) {
 | 
			
		||||
        ogs_error("Invalid IPv6 string = %s", string);
 | 
			
		||||
        return OGS_ERROR;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    memcpy(addr6, tmp.sin6.sin6_addr.s6_addr, OGS_IPV6_LEN);
 | 
			
		||||
 | 
			
		||||
    return OGS_OK;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int ogs_ipv6prefix_from_string(uint8_t *addr6, uint8_t *prefixlen, char *string)
 | 
			
		||||
{
 | 
			
		||||
    int rv;
 | 
			
		||||
    ogs_sockaddr_t tmp;
 | 
			
		||||
    char *v = NULL, *pv = NULL, *ipstr = NULL, *mask_or_numbits = NULL;
 | 
			
		||||
 | 
			
		||||
    ogs_assert(addr6);
 | 
			
		||||
    ogs_assert(prefixlen);
 | 
			
		||||
    ogs_assert(string);
 | 
			
		||||
    pv = v = ogs_strdup(string);
 | 
			
		||||
    ogs_expect_or_return_val(v, OGS_ERROR);
 | 
			
		||||
 | 
			
		||||
    ipstr = strsep(&v, "/");
 | 
			
		||||
    if (ipstr)
 | 
			
		||||
        mask_or_numbits = v;
 | 
			
		||||
 | 
			
		||||
    if (!ipstr || !mask_or_numbits) {
 | 
			
		||||
        ogs_error("Invalid IPv6 Prefix string = %s", v);
 | 
			
		||||
        ogs_free(v);
 | 
			
		||||
        return OGS_ERROR;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    rv = ogs_inet_pton(AF_INET6, ipstr, &tmp);
 | 
			
		||||
    ogs_expect_or_return_val(rv == OGS_OK, rv);
 | 
			
		||||
 | 
			
		||||
    memcpy(addr6, tmp.sin6.sin6_addr.s6_addr, OGS_IPV6_LEN);
 | 
			
		||||
    *prefixlen = atoi(mask_or_numbits);
 | 
			
		||||
 | 
			
		||||
    ogs_free(pv);
 | 
			
		||||
    return OGS_OK;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int ogs_sockaddr_to_user_plane_ip_resource_info(
 | 
			
		||||
    ogs_sockaddr_t *addr, ogs_sockaddr_t *addr6,
 | 
			
		||||
    ogs_user_plane_ip_resource_info_t *info)
 | 
			
		||||
@@ -574,3 +702,303 @@ void ogs_session_data_free(ogs_session_data_t *session_data)
 | 
			
		||||
    for (i = 0; i < session_data->num_of_pcc_rule; i++)
 | 
			
		||||
        OGS_PCC_RULE_FREE(&session_data->pcc_rule[i]);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ogs_ims_data_free(ogs_ims_data_t *ims_data)
 | 
			
		||||
{
 | 
			
		||||
    int i, j, k;
 | 
			
		||||
 | 
			
		||||
    ogs_assert(ims_data);
 | 
			
		||||
 | 
			
		||||
    for (i = 0; i < ims_data->num_of_media_component; i++) {
 | 
			
		||||
        ogs_media_component_t *media_component = &ims_data->media_component[i];
 | 
			
		||||
 | 
			
		||||
        for (j = 0; j < media_component->num_of_sub; j++) {
 | 
			
		||||
            ogs_media_sub_component_t *sub = &media_component->sub[j];
 | 
			
		||||
 | 
			
		||||
            for (k = 0; k < sub->num_of_flow; k++) {
 | 
			
		||||
                ogs_flow_t *flow = &sub->flow[k];
 | 
			
		||||
 | 
			
		||||
                if (flow->description) {
 | 
			
		||||
                    ogs_free(flow->description);
 | 
			
		||||
                } else
 | 
			
		||||
                    ogs_assert_if_reached();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int flow_rx_to_gx(ogs_flow_t *rx_flow, ogs_flow_t *gx_flow)
 | 
			
		||||
{
 | 
			
		||||
    int len;
 | 
			
		||||
    char *from_str, *to_str;
 | 
			
		||||
 | 
			
		||||
    ogs_assert(rx_flow);
 | 
			
		||||
    ogs_assert(gx_flow);
 | 
			
		||||
 | 
			
		||||
    if (!strncmp(rx_flow->description,
 | 
			
		||||
                "permit out", strlen("permit out"))) {
 | 
			
		||||
        gx_flow->direction = OGS_FLOW_DOWNLINK_ONLY;
 | 
			
		||||
        gx_flow->description = ogs_strdup(rx_flow->description);
 | 
			
		||||
        ogs_assert(gx_flow->description);
 | 
			
		||||
 | 
			
		||||
    } else if (!strncmp(rx_flow->description,
 | 
			
		||||
                "permit in", strlen("permit in"))) {
 | 
			
		||||
        gx_flow->direction = OGS_FLOW_UPLINK_ONLY;
 | 
			
		||||
 | 
			
		||||
        /* 'permit in' should be changed
 | 
			
		||||
         * 'permit out' in Gx Diameter */
 | 
			
		||||
        len = strlen(rx_flow->description)+2;
 | 
			
		||||
        gx_flow->description = ogs_malloc(len);
 | 
			
		||||
        ogs_assert(gx_flow->description);
 | 
			
		||||
        strcpy(gx_flow->description, "permit out");
 | 
			
		||||
        from_str = strstr(&rx_flow->description[strlen("permit in")], "from");
 | 
			
		||||
        ogs_assert(from_str);
 | 
			
		||||
        to_str = strstr(&rx_flow->description[strlen("permit in")], "to");
 | 
			
		||||
        ogs_assert(to_str);
 | 
			
		||||
        strncat(gx_flow->description,
 | 
			
		||||
            &rx_flow->description[strlen("permit in")],
 | 
			
		||||
            strlen(rx_flow->description) -
 | 
			
		||||
                strlen("permit in") - strlen(from_str));
 | 
			
		||||
        strcat(gx_flow->description, "from");
 | 
			
		||||
        strcat(gx_flow->description, &to_str[strlen("to")]);
 | 
			
		||||
        strcat(gx_flow->description, " to");
 | 
			
		||||
        strncat(gx_flow->description, &from_str[strlen("from")],
 | 
			
		||||
                strlen(from_str) - strlen(to_str) - strlen("from") - 1);
 | 
			
		||||
        ogs_assert(len == strlen(gx_flow->description)+1);
 | 
			
		||||
    } else {
 | 
			
		||||
        ogs_error("Invalid Flow Descripton : [%s]", rx_flow->description);
 | 
			
		||||
        return OGS_ERROR;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return OGS_OK;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int ogs_pcc_rule_num_of_flow_equal_to_media(
 | 
			
		||||
        ogs_pcc_rule_t *pcc_rule, ogs_media_component_t *media_component)
 | 
			
		||||
{
 | 
			
		||||
    int rv;
 | 
			
		||||
    int i, j, k;
 | 
			
		||||
    int matched = 0;
 | 
			
		||||
    int new = 0;
 | 
			
		||||
 | 
			
		||||
    ogs_assert(pcc_rule);
 | 
			
		||||
    ogs_assert(media_component);
 | 
			
		||||
 | 
			
		||||
    for (i = 0; i < media_component->num_of_sub; i++) {
 | 
			
		||||
        ogs_media_sub_component_t *sub = &media_component->sub[i];
 | 
			
		||||
 | 
			
		||||
        for (j = 0; j < sub->num_of_flow; j++) {
 | 
			
		||||
            new++;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (new == 0) {
 | 
			
		||||
        /* No new flow in Media-Component */
 | 
			
		||||
        return pcc_rule->num_of_flow;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    for (i = 0; i < media_component->num_of_sub; i++) {
 | 
			
		||||
        ogs_media_sub_component_t *sub = &media_component->sub[i];
 | 
			
		||||
 | 
			
		||||
        for (j = 0; j < sub->num_of_flow &&
 | 
			
		||||
                    j < OGS_MAX_NUM_OF_FLOW_IN_MEDIA_SUB_COMPONENT; j++) {
 | 
			
		||||
            ogs_flow_t gx_flow;
 | 
			
		||||
            ogs_flow_t *rx_flow = &sub->flow[j];
 | 
			
		||||
 | 
			
		||||
            rv = flow_rx_to_gx(rx_flow, &gx_flow);
 | 
			
		||||
            if (rv != OGS_OK) {
 | 
			
		||||
                ogs_error("flow reformatting error");
 | 
			
		||||
                return OGS_ERROR;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            for (k = 0; k < pcc_rule->num_of_flow; k++) {
 | 
			
		||||
                if (gx_flow.direction == pcc_rule->flow[k].direction &&
 | 
			
		||||
                    !strcmp(gx_flow.description,
 | 
			
		||||
                        pcc_rule->flow[k].description)) {
 | 
			
		||||
                    matched++;
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            OGS_FLOW_FREE(&gx_flow);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return matched;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int ogs_pcc_rule_install_flow_from_media(
 | 
			
		||||
        ogs_pcc_rule_t *pcc_rule, ogs_media_component_t *media_component)
 | 
			
		||||
{
 | 
			
		||||
    int rv;
 | 
			
		||||
    int i, j;
 | 
			
		||||
 | 
			
		||||
    ogs_assert(pcc_rule);
 | 
			
		||||
    ogs_assert(media_component);
 | 
			
		||||
 | 
			
		||||
    /* Remove Flow from PCC Rule */
 | 
			
		||||
    for (i = 0; i < pcc_rule->num_of_flow; i++) {
 | 
			
		||||
        OGS_FLOW_FREE(&pcc_rule->flow[i]);
 | 
			
		||||
    }
 | 
			
		||||
    pcc_rule->num_of_flow = 0;
 | 
			
		||||
 | 
			
		||||
    for (i = 0; i < media_component->num_of_sub; i++) {
 | 
			
		||||
        ogs_media_sub_component_t *sub = &media_component->sub[i];
 | 
			
		||||
 | 
			
		||||
        /* Copy Flow to PCC Rule */
 | 
			
		||||
        for (j = 0; j < sub->num_of_flow &&
 | 
			
		||||
                    j < OGS_MAX_NUM_OF_FLOW_IN_MEDIA_SUB_COMPONENT; j++) {
 | 
			
		||||
            ogs_flow_t *rx_flow = NULL;
 | 
			
		||||
            ogs_flow_t *gx_flow = NULL;
 | 
			
		||||
 | 
			
		||||
            if (pcc_rule->num_of_flow < OGS_MAX_NUM_OF_FLOW_IN_PCC_RULE) {
 | 
			
		||||
                rx_flow = &sub->flow[j];
 | 
			
		||||
                gx_flow = &pcc_rule->flow[pcc_rule->num_of_flow];
 | 
			
		||||
 | 
			
		||||
                rv = flow_rx_to_gx(rx_flow, gx_flow);
 | 
			
		||||
                if (rv != OGS_OK) {
 | 
			
		||||
                    ogs_error("flow reformatting error");
 | 
			
		||||
                    return OGS_ERROR;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                pcc_rule->num_of_flow++;
 | 
			
		||||
            } else {
 | 
			
		||||
                ogs_error("Overflow: Number of Flow");
 | 
			
		||||
                return OGS_ERROR;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return OGS_OK;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int ogs_pcc_rule_update_qos_from_media(
 | 
			
		||||
        ogs_pcc_rule_t *pcc_rule, ogs_media_component_t *media_component)
 | 
			
		||||
{
 | 
			
		||||
    int rv;
 | 
			
		||||
    int i, j;
 | 
			
		||||
 | 
			
		||||
    ogs_assert(pcc_rule);
 | 
			
		||||
    ogs_assert(media_component);
 | 
			
		||||
 | 
			
		||||
    pcc_rule->qos.mbr.downlink = 0;
 | 
			
		||||
    pcc_rule->qos.mbr.uplink = 0;
 | 
			
		||||
    pcc_rule->qos.gbr.downlink = 0;
 | 
			
		||||
    pcc_rule->qos.gbr.uplink = 0;
 | 
			
		||||
 | 
			
		||||
    for (i = 0; i < media_component->num_of_sub; i++) {
 | 
			
		||||
        ogs_media_sub_component_t *sub = &media_component->sub[i];
 | 
			
		||||
 | 
			
		||||
        for (j = 0; j < sub->num_of_flow &&
 | 
			
		||||
                    j < OGS_MAX_NUM_OF_FLOW_IN_MEDIA_SUB_COMPONENT; j++) {
 | 
			
		||||
            ogs_flow_t gx_flow;
 | 
			
		||||
            ogs_flow_t *rx_flow = &sub->flow[j];
 | 
			
		||||
 | 
			
		||||
            rv = flow_rx_to_gx(rx_flow, &gx_flow);
 | 
			
		||||
            if (rv != OGS_OK) {
 | 
			
		||||
                ogs_error("flow reformatting error");
 | 
			
		||||
                return OGS_ERROR;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (gx_flow.direction == OGS_FLOW_DOWNLINK_ONLY) {
 | 
			
		||||
                if (sub->flow_usage == OGS_FLOW_USAGE_RTCP) {
 | 
			
		||||
                    if (media_component->rr_bandwidth &&
 | 
			
		||||
                        media_component->rs_bandwidth) {
 | 
			
		||||
                        pcc_rule->qos.mbr.downlink +=
 | 
			
		||||
                            (media_component->rr_bandwidth +
 | 
			
		||||
                            media_component->rs_bandwidth);
 | 
			
		||||
                    } else if (media_component->max_requested_bandwidth_dl) {
 | 
			
		||||
                        if (media_component->rr_bandwidth &&
 | 
			
		||||
                            !media_component->rs_bandwidth) {
 | 
			
		||||
                            pcc_rule->qos.mbr.downlink +=
 | 
			
		||||
                                ogs_max(0.05 *
 | 
			
		||||
                                    media_component->max_requested_bandwidth_dl,
 | 
			
		||||
                                    media_component->rr_bandwidth);
 | 
			
		||||
                        }
 | 
			
		||||
                        if (!media_component->rr_bandwidth &&
 | 
			
		||||
                            media_component->rs_bandwidth) {
 | 
			
		||||
                            pcc_rule->qos.mbr.downlink +=
 | 
			
		||||
                                ogs_max(0.05 *
 | 
			
		||||
                                    media_component->max_requested_bandwidth_dl,
 | 
			
		||||
                                    media_component->rs_bandwidth);
 | 
			
		||||
                        }
 | 
			
		||||
                        if (!media_component->rr_bandwidth &&
 | 
			
		||||
                            !media_component->rs_bandwidth) {
 | 
			
		||||
                            pcc_rule->qos.mbr.downlink +=
 | 
			
		||||
                                0.05 *
 | 
			
		||||
                                    media_component->max_requested_bandwidth_dl;
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                } else {
 | 
			
		||||
                    if (gx_flow.description) {
 | 
			
		||||
                        pcc_rule->qos.mbr.downlink +=
 | 
			
		||||
                            media_component->max_requested_bandwidth_dl;
 | 
			
		||||
                        pcc_rule->qos.gbr.downlink +=
 | 
			
		||||
                            media_component->min_requested_bandwidth_dl;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            } else if (gx_flow.direction == OGS_FLOW_UPLINK_ONLY) {
 | 
			
		||||
                if (sub->flow_usage == OGS_FLOW_USAGE_RTCP) {
 | 
			
		||||
                    if (media_component->rr_bandwidth &&
 | 
			
		||||
                        media_component->rs_bandwidth) {
 | 
			
		||||
                        pcc_rule->qos.mbr.uplink +=
 | 
			
		||||
                            (media_component->rr_bandwidth +
 | 
			
		||||
                            media_component->rs_bandwidth);
 | 
			
		||||
                    } else if (media_component->max_requested_bandwidth_ul) {
 | 
			
		||||
                        if (media_component->rr_bandwidth &&
 | 
			
		||||
                            !media_component->rs_bandwidth) {
 | 
			
		||||
                            pcc_rule->qos.mbr.uplink +=
 | 
			
		||||
                                ogs_max(0.05 *
 | 
			
		||||
                                    media_component->max_requested_bandwidth_ul,
 | 
			
		||||
                                    media_component->rr_bandwidth);
 | 
			
		||||
                        }
 | 
			
		||||
                        if (!media_component->rr_bandwidth &&
 | 
			
		||||
                            media_component->rs_bandwidth) {
 | 
			
		||||
                            pcc_rule->qos.mbr.uplink +=
 | 
			
		||||
                                ogs_max(0.05 *
 | 
			
		||||
                                    media_component->max_requested_bandwidth_ul,
 | 
			
		||||
                                    media_component->rs_bandwidth);
 | 
			
		||||
                        }
 | 
			
		||||
                        if (!media_component->rr_bandwidth &&
 | 
			
		||||
                            !media_component->rs_bandwidth) {
 | 
			
		||||
                            pcc_rule->qos.mbr.uplink +=
 | 
			
		||||
                                0.05 *
 | 
			
		||||
                                    media_component->max_requested_bandwidth_ul;
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                } else {
 | 
			
		||||
                    if (gx_flow.description) {
 | 
			
		||||
                        pcc_rule->qos.mbr.uplink +=
 | 
			
		||||
                            media_component->max_requested_bandwidth_ul;
 | 
			
		||||
                        pcc_rule->qos.gbr.uplink +=
 | 
			
		||||
                            media_component->min_requested_bandwidth_ul;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            } else
 | 
			
		||||
                ogs_assert_if_reached();
 | 
			
		||||
 | 
			
		||||
            OGS_FLOW_FREE(&gx_flow);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (pcc_rule->qos.mbr.downlink == 0) {
 | 
			
		||||
        pcc_rule->qos.mbr.downlink +=
 | 
			
		||||
            media_component->max_requested_bandwidth_dl;
 | 
			
		||||
        pcc_rule->qos.mbr.downlink +=
 | 
			
		||||
            (media_component->rr_bandwidth + media_component->rs_bandwidth);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (pcc_rule->qos.mbr.uplink == 0) {
 | 
			
		||||
        pcc_rule->qos.mbr.uplink +=
 | 
			
		||||
            media_component->max_requested_bandwidth_ul;
 | 
			
		||||
        pcc_rule->qos.mbr.uplink +=
 | 
			
		||||
            (media_component->rr_bandwidth + media_component->rs_bandwidth);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (pcc_rule->qos.gbr.downlink == 0)
 | 
			
		||||
        pcc_rule->qos.gbr.downlink = pcc_rule->qos.mbr.downlink;
 | 
			
		||||
    if (pcc_rule->qos.gbr.uplink == 0)
 | 
			
		||||
        pcc_rule->qos.gbr.uplink = pcc_rule->qos.mbr.uplink;
 | 
			
		||||
 | 
			
		||||
    return OGS_OK;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -30,12 +30,23 @@ extern "C" {
 | 
			
		||||
 | 
			
		||||
#define OGS_MAX_NUM_OF_SESS             4   /* Num of APN(Session) per UE */
 | 
			
		||||
#define OGS_MAX_NUM_OF_BEARER           4   /* Num of Bearer per Session */
 | 
			
		||||
#define OGS_MAX_NUM_OF_RULE             4   /* Num of Rule per Session */
 | 
			
		||||
#define OGS_MAX_NUM_OF_PF               16  /* Num of PacketFilter per Bearer */
 | 
			
		||||
#define OGS_MAX_NUM_OF_PACKET_BUFFER    64  /* Num of PacketBuffer per UE */
 | 
			
		||||
 | 
			
		||||
/* Num of PacketFilter per Bearer(GTP) or QoS(NAS-5GS) */
 | 
			
		||||
#define OGS_MAX_NUM_OF_PACKET_FILTER    16
 | 
			
		||||
/*
 | 
			
		||||
 * The array of TLV messages is limited to 8.
 | 
			
		||||
 * So, Flow(PDI.SDF_Filter) in PDR is limited to 8.
 | 
			
		||||
 *
 | 
			
		||||
 * However, the number of flow in bearer context seems to need more than 16.
 | 
			
		||||
 *
 | 
			
		||||
 * Therefore, the maximum number of flows of messages is defined as 8,
 | 
			
		||||
 * and the maximum number of flows stored by the context is 16.
 | 
			
		||||
 */
 | 
			
		||||
#define OGS_MAX_NUM_OF_FLOW_IN_PDR      8
 | 
			
		||||
#define OGS_MAX_NUM_OF_FLOW_IN_GTP      OGS_MAX_NUM_OF_FLOW_IN_PDR
 | 
			
		||||
#define OGS_MAX_NUM_OF_FLOW_IN_NAS      OGS_MAX_NUM_OF_FLOW_IN_PDR
 | 
			
		||||
#define OGS_MAX_NUM_OF_FLOW_IN_PCC_RULE OGS_MAX_NUM_OF_FLOW_IN_PDR
 | 
			
		||||
#define OGS_MAX_NUM_OF_FLOW_IN_MEDIA_SUB_COMPONENT OGS_MAX_NUM_OF_FLOW_IN_PDR
 | 
			
		||||
#define OGS_MAX_NUM_OF_FLOW_IN_BEARER   16
 | 
			
		||||
 | 
			
		||||
#define OGS_MAX_NUM_OF_GTPU_RESOURCE    4
 | 
			
		||||
 | 
			
		||||
@@ -120,6 +131,22 @@ char *ogs_plmn_id_mnc_string(ogs_plmn_id_t *plmn_id);
 | 
			
		||||
#define OGS_PLMNIDSTRLEN    (sizeof(ogs_plmn_id_t)*2+1)
 | 
			
		||||
char *ogs_plmn_id_to_string(ogs_plmn_id_t *plmn_id, char *buf);
 | 
			
		||||
 | 
			
		||||
/*************************
 | 
			
		||||
 * NAS PLMN_ID Structure */
 | 
			
		||||
typedef struct ogs_nas_plmn_id_s {
 | 
			
		||||
ED2(uint8_t mcc2:4;,
 | 
			
		||||
    uint8_t mcc1:4;)
 | 
			
		||||
ED2(uint8_t mnc3:4;,
 | 
			
		||||
    uint8_t mcc3:4;)
 | 
			
		||||
ED2(uint8_t mnc2:4;,
 | 
			
		||||
    uint8_t mnc1:4;)
 | 
			
		||||
} __attribute__ ((packed)) ogs_nas_plmn_id_t;
 | 
			
		||||
 | 
			
		||||
void *ogs_nas_from_plmn_id(
 | 
			
		||||
        ogs_nas_plmn_id_t *ogs_nas_plmn_id, ogs_plmn_id_t *plmn_id);
 | 
			
		||||
void *ogs_nas_to_plmn_id(
 | 
			
		||||
        ogs_plmn_id_t *plmn_id, ogs_nas_plmn_id_t *ogs_nas_plmn_id);
 | 
			
		||||
 | 
			
		||||
/************************************
 | 
			
		||||
 * AMF_ID Structure                 */
 | 
			
		||||
typedef struct ogs_amf_id_s {
 | 
			
		||||
@@ -199,6 +226,7 @@ ogs_uint24_t ogs_s_nssai_sd_from_string(const char *hex);
 | 
			
		||||
#define OGS_IPV4_LEN                        4
 | 
			
		||||
#define OGS_IPV6_LEN                        16
 | 
			
		||||
#define OGS_IPV6_DEFAULT_PREFIX_LEN         64
 | 
			
		||||
#define OGS_IPV6_128_PREFIX_LEN             128
 | 
			
		||||
#define OGS_IPV4V6_LEN                      20
 | 
			
		||||
typedef struct ogs_ip_s {
 | 
			
		||||
    uint32_t addr;
 | 
			
		||||
@@ -212,8 +240,14 @@ ED3(uint8_t ipv4:1;,
 | 
			
		||||
int ogs_ip_to_sockaddr(ogs_ip_t *ip, uint16_t port, ogs_sockaddr_t **list);
 | 
			
		||||
void ogs_sockaddr_to_ip(
 | 
			
		||||
        ogs_sockaddr_t *addr, ogs_sockaddr_t *addr6, ogs_ip_t *ip);
 | 
			
		||||
 | 
			
		||||
char *ogs_ipv4_to_string(uint32_t addr);
 | 
			
		||||
char *ogs_ipv6_to_string(uint8_t *addr6);
 | 
			
		||||
char *ogs_ipv6addr_to_string(uint8_t *addr6);
 | 
			
		||||
char *ogs_ipv6prefix_to_string(uint8_t *addr6, uint8_t prefixlen);
 | 
			
		||||
int ogs_ipv4_from_string(uint32_t *addr, char *string);
 | 
			
		||||
int ogs_ipv6addr_from_string(uint8_t *addr6, char *string);
 | 
			
		||||
int ogs_ipv6prefix_from_string(
 | 
			
		||||
        uint8_t *addr6, uint8_t *prefixlen, char *string);
 | 
			
		||||
 | 
			
		||||
/**************************************************
 | 
			
		||||
 * 8.14 PDN Address Allocation (PAA) */
 | 
			
		||||
@@ -314,8 +348,7 @@ typedef struct ogs_flow_s {
 | 
			
		||||
 | 
			
		||||
#define OGS_FLOW_FREE(__fLOW) \
 | 
			
		||||
    do { \
 | 
			
		||||
        if ((__fLOW)->description) \
 | 
			
		||||
        { \
 | 
			
		||||
        if ((__fLOW)->description) { \
 | 
			
		||||
            ogs_free((__fLOW)->description); \
 | 
			
		||||
        } \
 | 
			
		||||
        else \
 | 
			
		||||
@@ -332,16 +365,9 @@ typedef struct ogs_pcc_rule_s {
 | 
			
		||||
    char *id;   /* 5GC */
 | 
			
		||||
    char *name; /* EPC */
 | 
			
		||||
 | 
			
		||||
/* Num of Flow per PCC Rule */
 | 
			
		||||
#define OGS_MAX_NUM_OF_FLOW                     8
 | 
			
		||||
    ogs_flow_t flow[OGS_MAX_NUM_OF_FLOW];
 | 
			
		||||
    ogs_flow_t flow[OGS_MAX_NUM_OF_FLOW_IN_PCC_RULE];
 | 
			
		||||
    int num_of_flow;
 | 
			
		||||
 | 
			
		||||
#define OGS_FLOW_STATUS_ENABLED_UPLINK          0
 | 
			
		||||
#define OGS_FLOW_STATUS_ENABLED_DOWNLINK        1
 | 
			
		||||
#define OGS_FLOW_STATUS_ENABLED                 2
 | 
			
		||||
#define OGS_FLOW_STATUS_DISABLED                3
 | 
			
		||||
#define OGS_FLOW_STATUS_REMOVE                  4
 | 
			
		||||
    int flow_status;
 | 
			
		||||
    uint32_t precedence;
 | 
			
		||||
        
 | 
			
		||||
@@ -529,7 +555,7 @@ int ogs_pco_build(unsigned char *data, int data_len, ogs_pco_t *pco);
 | 
			
		||||
 | 
			
		||||
/* Flags(1) + TEID Range(1) + IPV4(4) + IPV6(16) + Source Interface(1) = 23 */
 | 
			
		||||
#define OGS_MAX_USER_PLANE_IP_RESOURCE_INFO_LEN \
 | 
			
		||||
    (23 + OGS_MAX_APN_LEN)
 | 
			
		||||
    (23 + (OGS_MAX_APN_LEN+1))
 | 
			
		||||
typedef struct ogs_user_plane_ip_resource_info_s {
 | 
			
		||||
    union {
 | 
			
		||||
        struct {
 | 
			
		||||
@@ -554,7 +580,7 @@ ED6(uint8_t     spare:1;,
 | 
			
		||||
    uint8_t     teid_range;
 | 
			
		||||
    uint32_t    addr;
 | 
			
		||||
    uint8_t     addr6[OGS_IPV6_LEN];
 | 
			
		||||
    char        network_instance[OGS_MAX_APN_LEN];
 | 
			
		||||
    char        network_instance[OGS_MAX_APN_LEN+1];
 | 
			
		||||
    uint8_t     source_interface;
 | 
			
		||||
} __attribute__ ((packed)) ogs_user_plane_ip_resource_info_t;
 | 
			
		||||
 | 
			
		||||
@@ -624,6 +650,72 @@ typedef struct ogs_session_data_s {
 | 
			
		||||
 | 
			
		||||
void ogs_session_data_free(ogs_session_data_t *session_data);
 | 
			
		||||
 | 
			
		||||
typedef struct ogs_media_sub_component_s {
 | 
			
		||||
    uint32_t            flow_number;
 | 
			
		||||
/*
 | 
			
		||||
 * TS29.214
 | 
			
		||||
 * 5.3.12 Flow-Usage AVP
 | 
			
		||||
 *   NO_INFORMATION(0)
 | 
			
		||||
 *   RTCP(1)
 | 
			
		||||
 *   AF_SIGNALLING(2)
 | 
			
		||||
 *
 | 
			
		||||
 * TS29.514
 | 
			
		||||
 * 5.6.3.14 Enumeration: FlowUsage
 | 
			
		||||
 *   NO_INFO : 1
 | 
			
		||||
 *   RTCP : 2
 | 
			
		||||
 *   AF_SIGNALLING : 3
 | 
			
		||||
 *
 | 
			
		||||
 * EPC and 5GC have different values for FlowUsage
 | 
			
		||||
 * At this point, we will use the 5GC value.
 | 
			
		||||
 */
 | 
			
		||||
#define OGS_FLOW_USAGE_NO_INFO          1
 | 
			
		||||
#define OGS_FLOW_USAGE_RTCP             2
 | 
			
		||||
#define OGS_FLOW_USAGE_AF_SIGNALLING    3
 | 
			
		||||
    uint32_t            flow_usage;
 | 
			
		||||
    ogs_flow_t          flow[OGS_MAX_NUM_OF_FLOW_IN_MEDIA_SUB_COMPONENT];
 | 
			
		||||
    int                 num_of_flow;
 | 
			
		||||
} ogs_media_sub_component_t;
 | 
			
		||||
 | 
			
		||||
typedef struct ogs_media_component_s {
 | 
			
		||||
    uint32_t            media_component_number;
 | 
			
		||||
    uint32_t            media_type;
 | 
			
		||||
 | 
			
		||||
    uint64_t            max_requested_bandwidth_dl;
 | 
			
		||||
    uint64_t            max_requested_bandwidth_ul;
 | 
			
		||||
    uint64_t            min_requested_bandwidth_dl;
 | 
			
		||||
    uint64_t            min_requested_bandwidth_ul;
 | 
			
		||||
    uint64_t            rr_bandwidth;
 | 
			
		||||
    uint64_t            rs_bandwidth;
 | 
			
		||||
 | 
			
		||||
    int                 flow_status;
 | 
			
		||||
 | 
			
		||||
#define OGS_MAX_NUM_OF_MEDIA_SUB_COMPONENT     8
 | 
			
		||||
    ogs_media_sub_component_t sub[OGS_MAX_NUM_OF_MEDIA_SUB_COMPONENT];
 | 
			
		||||
    int                 num_of_sub;
 | 
			
		||||
} ogs_media_component_t;
 | 
			
		||||
 | 
			
		||||
typedef struct ogs_ims_data_s {
 | 
			
		||||
    int num_of_msisdn;
 | 
			
		||||
    struct {
 | 
			
		||||
        uint8_t buf[OGS_MAX_MSISDN_LEN];
 | 
			
		||||
        int len;
 | 
			
		||||
        char bcd[OGS_MAX_MSISDN_BCD_LEN+1];
 | 
			
		||||
    } msisdn[OGS_MAX_NUM_OF_MSISDN];
 | 
			
		||||
 | 
			
		||||
#define OGS_MAX_NUM_OF_MEDIA_COMPONENT 16
 | 
			
		||||
    ogs_media_component_t media_component[OGS_MAX_NUM_OF_MEDIA_COMPONENT];
 | 
			
		||||
    int num_of_media_component;
 | 
			
		||||
} ogs_ims_data_t;
 | 
			
		||||
 | 
			
		||||
void ogs_ims_data_free(ogs_ims_data_t *ims_data);
 | 
			
		||||
 | 
			
		||||
int ogs_pcc_rule_num_of_flow_equal_to_media(
 | 
			
		||||
        ogs_pcc_rule_t *pcc_rule, ogs_media_component_t *media_component);
 | 
			
		||||
int ogs_pcc_rule_install_flow_from_media(
 | 
			
		||||
        ogs_pcc_rule_t *pcc_rule, ogs_media_component_t *media_component);
 | 
			
		||||
int ogs_pcc_rule_update_qos_from_media(
 | 
			
		||||
        ogs_pcc_rule_t *pcc_rule, ogs_media_component_t *media_component);
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -190,10 +190,10 @@ char *ogs_uint64_to_string(uint64_t x)
 | 
			
		||||
    char *str, *p;
 | 
			
		||||
 | 
			
		||||
    str = ogs_uint64_to_0string(x);
 | 
			
		||||
    ogs_assert(str);
 | 
			
		||||
    ogs_expect_or_return_val(str, NULL);
 | 
			
		||||
 | 
			
		||||
    p = ogs_left_trimcharacter(str, '0');
 | 
			
		||||
    ogs_assert(p);
 | 
			
		||||
    ogs_expect_or_return_val(p, NULL);
 | 
			
		||||
 | 
			
		||||
    ogs_free(str);
 | 
			
		||||
    return ogs_strdup(p);
 | 
			
		||||
 
 | 
			
		||||
@@ -112,7 +112,7 @@ static int epoll_add(ogs_poll_t *poll)
 | 
			
		||||
    map = ogs_hash_get(context->map_hash, &poll->fd, sizeof(poll->fd));
 | 
			
		||||
    if (!map) {
 | 
			
		||||
        map = ogs_calloc(1, sizeof(*map));
 | 
			
		||||
        ogs_assert(map);
 | 
			
		||||
        ogs_expect_or_return_val(map, OGS_ERROR);
 | 
			
		||||
 | 
			
		||||
        op = EPOLL_CTL_ADD;
 | 
			
		||||
        ogs_hash_set(context->map_hash, &poll->fd, sizeof(poll->fd), map);
 | 
			
		||||
 
 | 
			
		||||
@@ -61,7 +61,7 @@ struct ogs_hash_t {
 | 
			
		||||
 | 
			
		||||
static ogs_hash_entry_t **alloc_array(ogs_hash_t *ht, unsigned int max)
 | 
			
		||||
{
 | 
			
		||||
   return ogs_calloc(1, sizeof(*ht->array) * (max + 1));
 | 
			
		||||
   return ogs_calloc_or_assert(1, sizeof(*ht->array) * (max + 1));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ogs_hash_t *ogs_hash_make()
 | 
			
		||||
@@ -70,6 +70,7 @@ ogs_hash_t *ogs_hash_make()
 | 
			
		||||
    ogs_time_t now = ogs_get_monotonic_time();
 | 
			
		||||
 | 
			
		||||
    ht = ogs_malloc(sizeof(ogs_hash_t));
 | 
			
		||||
    ogs_expect_or_return_val(ht, NULL);
 | 
			
		||||
 | 
			
		||||
    ht->free = NULL;
 | 
			
		||||
    ht->count = 0;
 | 
			
		||||
@@ -85,6 +86,7 @@ ogs_hash_t *ogs_hash_make()
 | 
			
		||||
ogs_hash_t *ogs_hash_make_custom(ogs_hashfunc_t hash_func)
 | 
			
		||||
{
 | 
			
		||||
    ogs_hash_t *ht = ogs_hash_make();
 | 
			
		||||
    ogs_expect_or_return_val(ht, NULL);
 | 
			
		||||
    ht->hash_func = hash_func;
 | 
			
		||||
    return ht;
 | 
			
		||||
}
 | 
			
		||||
@@ -283,7 +285,7 @@ static ogs_hash_entry_t **find_entry(ogs_hash_t *ht,
 | 
			
		||||
    if ((he = ht->free) != NULL)
 | 
			
		||||
        ht->free = he->next;
 | 
			
		||||
    else
 | 
			
		||||
        he = ogs_malloc_debug(sizeof(*he), file_line);
 | 
			
		||||
        he = ogs_malloc_debug(sizeof(*he), file_line, true);
 | 
			
		||||
    he->next = NULL;
 | 
			
		||||
    he->hash = hash;
 | 
			
		||||
    he->key  = key;
 | 
			
		||||
 
 | 
			
		||||
@@ -68,6 +68,7 @@ static void kqueue_init(ogs_pollset_t *pollset)
 | 
			
		||||
 | 
			
		||||
	context->change_list = ogs_calloc(
 | 
			
		||||
        pollset->capacity, sizeof(struct kevent));
 | 
			
		||||
    ogs_assert(context->change_list);
 | 
			
		||||
	context->event_list = ogs_calloc(
 | 
			
		||||
        pollset->capacity, sizeof(struct kevent));
 | 
			
		||||
	ogs_assert(context->change_list);
 | 
			
		||||
 
 | 
			
		||||
@@ -64,15 +64,30 @@ static ogs_inline void *ogs_list_prev(void *lnode)
 | 
			
		||||
    return node->prev;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#define ogs_list_entry(ptr, type, member) ogs_container_of(ptr, type, member)
 | 
			
		||||
 | 
			
		||||
#define ogs_list_for_each(list, node) \
 | 
			
		||||
    for (node = ogs_list_first(list); (node); \
 | 
			
		||||
        node = ogs_list_next(node))
 | 
			
		||||
 | 
			
		||||
#define ogs_list_for_each_entry(list, node, member) \
 | 
			
		||||
    for (node = ogs_list_entry(ogs_list_first(list), typeof(*node), member); \
 | 
			
		||||
            (&node->member); \
 | 
			
		||||
                node = ogs_list_entry( \
 | 
			
		||||
                        ogs_list_next(&node->member), typeof(*node), member))
 | 
			
		||||
 | 
			
		||||
#define ogs_list_for_each_safe(list, n, node) \
 | 
			
		||||
    for (node = ogs_list_first(list); \
 | 
			
		||||
        (node) && (n = ogs_list_next(node), 1); \
 | 
			
		||||
        node = n)
 | 
			
		||||
 | 
			
		||||
#define ogs_list_for_each_entry_safe(list, n, node, member) \
 | 
			
		||||
    for (node = ogs_list_entry(ogs_list_first(list), typeof(*node), member); \
 | 
			
		||||
            (&node->member) && \
 | 
			
		||||
                (n = ogs_list_entry( \
 | 
			
		||||
                    ogs_list_next(&node->member), typeof(*node), member), 1); \
 | 
			
		||||
            node = n)
 | 
			
		||||
 | 
			
		||||
static ogs_inline void ogs_list_prepend(ogs_list_t *list, void *lnode)
 | 
			
		||||
{
 | 
			
		||||
    ogs_list_t *node = lnode;
 | 
			
		||||
 
 | 
			
		||||
@@ -134,6 +134,15 @@ void ogs_log_hexdump_func(ogs_log_level_e level, int domain_id,
 | 
			
		||||
        } \
 | 
			
		||||
    } while (0)
 | 
			
		||||
 | 
			
		||||
#define ogs_expect_or_return_val(expr, val) \
 | 
			
		||||
    do { \
 | 
			
		||||
        if (ogs_likely(expr)) ; \
 | 
			
		||||
        else { \
 | 
			
		||||
            ogs_error("%s: Expectation `%s' failed.", OGS_FUNC, #expr); \
 | 
			
		||||
            return (val); \
 | 
			
		||||
        } \
 | 
			
		||||
    } while (0)
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -109,6 +109,10 @@ extern "C" {
 | 
			
		||||
 | 
			
		||||
#elif defined(__FreeBSD__)
 | 
			
		||||
#include <sys/endian.h>
 | 
			
		||||
 | 
			
		||||
#elif defined(__linux__)
 | 
			
		||||
#include <endian.h>
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef WORDS_BIGENDIAN
 | 
			
		||||
@@ -181,7 +185,7 @@ static ogs_inline ogs_uint24_t ogs_htobe24(ogs_uint24_t x)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define ogs_container_of(ptr, type, member) \
 | 
			
		||||
    (type *)((u_char *)ptr - offsetof(type, member))
 | 
			
		||||
    (type *)((unsigned char *)ptr - offsetof(type, member))
 | 
			
		||||
 | 
			
		||||
#ifndef SWITCH_CASE_INIT
 | 
			
		||||
#define SWITCH_CASE_INIT
 | 
			
		||||
@@ -204,6 +208,8 @@ static ogs_inline ogs_uint24_t ogs_htobe24(ogs_uint24_t x)
 | 
			
		||||
 | 
			
		||||
#define OGS_FILE_LINE __FILE__ ":" OGS_STRINGIFY(__LINE__)
 | 
			
		||||
 | 
			
		||||
#define ogs_uint64_to_uint32(x) ((x >= 0xffffffffUL) ? 0xffffffffU : x)
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,7 @@
 | 
			
		||||
#undef OGS_LOG_DOMAIN
 | 
			
		||||
#define OGS_LOG_DOMAIN __ogs_mem_domain
 | 
			
		||||
 | 
			
		||||
void *ogs_malloc_debug(size_t size, const char *file_line)
 | 
			
		||||
void *ogs_malloc_debug(size_t size, const char *file_line, bool abort)
 | 
			
		||||
{
 | 
			
		||||
    size_t headroom = 0;
 | 
			
		||||
    ogs_pkbuf_t *pkbuf = NULL;
 | 
			
		||||
@@ -31,7 +31,12 @@ void *ogs_malloc_debug(size_t size, const char *file_line)
 | 
			
		||||
 | 
			
		||||
    headroom = sizeof(ogs_pkbuf_t *);
 | 
			
		||||
    pkbuf = ogs_pkbuf_alloc_debug(NULL, headroom + size, file_line);
 | 
			
		||||
    ogs_assert(pkbuf);
 | 
			
		||||
 | 
			
		||||
    if (abort == true)
 | 
			
		||||
        ogs_assert(pkbuf);
 | 
			
		||||
    else
 | 
			
		||||
        ogs_expect_or_return_val(pkbuf, NULL);
 | 
			
		||||
 | 
			
		||||
    ogs_pkbuf_reserve(pkbuf, headroom);
 | 
			
		||||
    memcpy(pkbuf->head, &pkbuf, headroom);
 | 
			
		||||
    ogs_pkbuf_put(pkbuf, size);
 | 
			
		||||
@@ -54,18 +59,23 @@ void ogs_free(void *ptr)
 | 
			
		||||
    ogs_pkbuf_free(pkbuf);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void *ogs_calloc_debug(size_t nmemb, size_t size, const char *file_line)
 | 
			
		||||
void *ogs_calloc_debug(
 | 
			
		||||
        size_t nmemb, size_t size, const char *file_line, bool abort)
 | 
			
		||||
{
 | 
			
		||||
    void *ptr = NULL;
 | 
			
		||||
 | 
			
		||||
    ptr = ogs_malloc_debug(nmemb * size, file_line);
 | 
			
		||||
    ogs_assert(ptr);
 | 
			
		||||
    ptr = ogs_malloc_debug(nmemb * size, file_line, abort);
 | 
			
		||||
    if (abort == true)
 | 
			
		||||
        ogs_assert(ptr);
 | 
			
		||||
    else
 | 
			
		||||
        ogs_expect_or_return_val(ptr, NULL);
 | 
			
		||||
 | 
			
		||||
    memset(ptr, 0, nmemb * size);
 | 
			
		||||
    return ptr;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void *ogs_realloc_debug(void *ptr, size_t size, const char *file_line)
 | 
			
		||||
void *ogs_realloc_debug(
 | 
			
		||||
        void *ptr, size_t size, const char *file_line, bool abort)
 | 
			
		||||
{
 | 
			
		||||
    size_t headroom = 0;
 | 
			
		||||
    ogs_pkbuf_t *pkbuf = NULL;
 | 
			
		||||
@@ -77,9 +87,17 @@ void *ogs_realloc_debug(void *ptr, size_t size, const char *file_line)
 | 
			
		||||
    headroom = sizeof(ogs_pkbuf_t *);
 | 
			
		||||
 | 
			
		||||
    memcpy(&pkbuf, (unsigned char*)ptr - headroom, headroom);
 | 
			
		||||
    ogs_assert(pkbuf);
 | 
			
		||||
 | 
			
		||||
    if (abort == true)
 | 
			
		||||
        ogs_assert(pkbuf);
 | 
			
		||||
    else
 | 
			
		||||
        ogs_expect_or_return_val(pkbuf, NULL);
 | 
			
		||||
 | 
			
		||||
    cluster = pkbuf->cluster;
 | 
			
		||||
    ogs_assert(cluster);
 | 
			
		||||
    if (abort == true)
 | 
			
		||||
        ogs_assert(cluster);
 | 
			
		||||
    else
 | 
			
		||||
        ogs_expect_or_return_val(cluster, NULL);
 | 
			
		||||
 | 
			
		||||
    if (!size) {
 | 
			
		||||
        ogs_pkbuf_free(pkbuf);
 | 
			
		||||
@@ -89,8 +107,13 @@ void *ogs_realloc_debug(void *ptr, size_t size, const char *file_line)
 | 
			
		||||
    if (size > (cluster->size - headroom)) {
 | 
			
		||||
        void *new = NULL;
 | 
			
		||||
 | 
			
		||||
        new = ogs_malloc_debug(size, file_line);
 | 
			
		||||
        ogs_assert(new);
 | 
			
		||||
        new = ogs_malloc_debug(size, file_line, abort);
 | 
			
		||||
 | 
			
		||||
        if (abort == true)
 | 
			
		||||
            ogs_assert(new);
 | 
			
		||||
        else
 | 
			
		||||
            ogs_expect_or_return_val(new, NULL);
 | 
			
		||||
 | 
			
		||||
        memcpy(new, ptr, pkbuf->len);
 | 
			
		||||
 | 
			
		||||
        ogs_pkbuf_free(pkbuf);
 | 
			
		||||
 
 | 
			
		||||
@@ -35,22 +35,24 @@ extern "C" {
 | 
			
		||||
            (__dATA) = NULL; \
 | 
			
		||||
        } \
 | 
			
		||||
    } while(0)
 | 
			
		||||
#define OGS_MEM_STORE(__dST, __sRC) \
 | 
			
		||||
    do { \
 | 
			
		||||
        ogs_assert((__sRC)); \
 | 
			
		||||
        OGS_MEM_CLEAR(__dST); \
 | 
			
		||||
        (__dST) = ogs_calloc(sizeof(*(__sRC)), sizeof(uint8_t)); \
 | 
			
		||||
        ogs_assert((__dST)); \
 | 
			
		||||
        memcpy((__dST), (__sRC), sizeof(*(__sRC))*sizeof(uint8_t)); \
 | 
			
		||||
    } while(0)
 | 
			
		||||
 | 
			
		||||
#define ogs_malloc(size) ogs_malloc_debug(size, OGS_FILE_LINE)
 | 
			
		||||
void *ogs_malloc_debug(size_t size, const char *file_line);
 | 
			
		||||
#define ogs_malloc(size) ogs_malloc_debug(size, OGS_FILE_LINE, false)
 | 
			
		||||
#define ogs_malloc_or_assert(size) \
 | 
			
		||||
    ogs_malloc_debug(size, OGS_FILE_LINE, true)
 | 
			
		||||
void *ogs_malloc_debug(size_t size, const char *file_line, bool abort);
 | 
			
		||||
void ogs_free(void *ptr);
 | 
			
		||||
#define ogs_calloc(nmemb, size) ogs_calloc_debug(nmemb, size, OGS_FILE_LINE)
 | 
			
		||||
void *ogs_calloc_debug(size_t nmemb, size_t size, const char *file_line);
 | 
			
		||||
#define ogs_realloc(ptr, size) ogs_realloc_debug(ptr, size, OGS_FILE_LINE)
 | 
			
		||||
void *ogs_realloc_debug(void *ptr, size_t size, const char *file_line);
 | 
			
		||||
#define ogs_calloc(nmemb, size) \
 | 
			
		||||
    ogs_calloc_debug(nmemb, size, OGS_FILE_LINE, false)
 | 
			
		||||
#define ogs_calloc_or_assert(nmemb, size) \
 | 
			
		||||
    ogs_calloc_debug(nmemb, size, OGS_FILE_LINE, true)
 | 
			
		||||
void *ogs_calloc_debug(
 | 
			
		||||
        size_t nmemb, size_t size, const char *file_line, bool abort);
 | 
			
		||||
#define ogs_realloc(ptr, size) \
 | 
			
		||||
    ogs_realloc_debug(ptr, size, OGS_FILE_LINE, false)
 | 
			
		||||
#define ogs_realloc_or_assert(ptr, size) \
 | 
			
		||||
    ogs_realloc_debug(ptr, size, OGS_FILE_LINE, true)
 | 
			
		||||
void *ogs_realloc_debug(
 | 
			
		||||
        void *ptr, size_t size, const char *file_line, bool abort);
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -95,8 +95,8 @@ void ogs_pkbuf_default_init(ogs_pkbuf_config_t *config)
 | 
			
		||||
    config->cluster_128_pool = 65536;
 | 
			
		||||
    config->cluster_256_pool = 16384;
 | 
			
		||||
    config->cluster_512_pool = 4096;
 | 
			
		||||
    config->cluster_1024_pool = 1024;
 | 
			
		||||
    config->cluster_2048_pool = 512;
 | 
			
		||||
    config->cluster_1024_pool = 2048;
 | 
			
		||||
    config->cluster_2048_pool = 1024;
 | 
			
		||||
    config->cluster_8192_pool = 512;
 | 
			
		||||
    config->cluster_big_pool = 8;
 | 
			
		||||
}
 | 
			
		||||
@@ -199,10 +199,13 @@ ogs_pkbuf_t *ogs_pkbuf_alloc_debug(
 | 
			
		||||
        ogs_thread_mutex_unlock(&pool->mutex);
 | 
			
		||||
        return NULL;
 | 
			
		||||
    }
 | 
			
		||||
    ogs_assert(cluster);
 | 
			
		||||
 | 
			
		||||
    ogs_pool_alloc(&pool->pkbuf, &pkbuf);
 | 
			
		||||
    ogs_assert(pkbuf);
 | 
			
		||||
    if (!pkbuf) {
 | 
			
		||||
        ogs_error("ogs_pkbuf_alloc() failed [size=%d]", size);
 | 
			
		||||
        ogs_thread_mutex_unlock(&pool->mutex);
 | 
			
		||||
        return NULL;
 | 
			
		||||
    }
 | 
			
		||||
    memset(pkbuf, 0, sizeof(*pkbuf));
 | 
			
		||||
 | 
			
		||||
    cluster->ref++;
 | 
			
		||||
@@ -248,7 +251,7 @@ void ogs_pkbuf_free(ogs_pkbuf_t *pkbuf)
 | 
			
		||||
    ogs_thread_mutex_unlock(&pool->mutex);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ogs_pkbuf_t *ogs_pkbuf_copy(ogs_pkbuf_t *pkbuf)
 | 
			
		||||
ogs_pkbuf_t *ogs_pkbuf_copy_debug(ogs_pkbuf_t *pkbuf, const char *file_line)
 | 
			
		||||
{
 | 
			
		||||
    ogs_pkbuf_pool_t *pool = NULL;
 | 
			
		||||
    ogs_pkbuf_t *newbuf = NULL;
 | 
			
		||||
@@ -288,51 +291,31 @@ static ogs_cluster_t *cluster_alloc(
 | 
			
		||||
 | 
			
		||||
    if (size <= OGS_CLUSTER_128_SIZE) {
 | 
			
		||||
        ogs_pool_alloc(&pool->cluster_128, (ogs_cluster_128_t**)&buffer);
 | 
			
		||||
        if (!buffer) {
 | 
			
		||||
            ogs_fatal("No OGS_CLUSTER_128_SIZE");
 | 
			
		||||
            return NULL;
 | 
			
		||||
        }
 | 
			
		||||
        ogs_expect_or_return_val(buffer, NULL);
 | 
			
		||||
        cluster->size = OGS_CLUSTER_128_SIZE;
 | 
			
		||||
    } else if (size <= OGS_CLUSTER_256_SIZE) {
 | 
			
		||||
        ogs_pool_alloc(&pool->cluster_256, (ogs_cluster_256_t**)&buffer);
 | 
			
		||||
        if (!buffer) {
 | 
			
		||||
            ogs_fatal("No OGS_CLUSTER_256_SIZE");
 | 
			
		||||
            return NULL;
 | 
			
		||||
        }
 | 
			
		||||
        ogs_expect_or_return_val(buffer, NULL);
 | 
			
		||||
        cluster->size = OGS_CLUSTER_256_SIZE;
 | 
			
		||||
    } else if (size <= OGS_CLUSTER_512_SIZE) {
 | 
			
		||||
        ogs_pool_alloc(&pool->cluster_512, (ogs_cluster_512_t**)&buffer);
 | 
			
		||||
        if (!buffer) {
 | 
			
		||||
            ogs_fatal("No OGS_CLUSTER_512_SIZE");
 | 
			
		||||
            return NULL;
 | 
			
		||||
        }
 | 
			
		||||
        ogs_expect_or_return_val(buffer, NULL);
 | 
			
		||||
        cluster->size = OGS_CLUSTER_512_SIZE;
 | 
			
		||||
    } else if (size <= OGS_CLUSTER_1024_SIZE) {
 | 
			
		||||
        ogs_pool_alloc(&pool->cluster_1024, (ogs_cluster_1024_t**)&buffer);
 | 
			
		||||
        if (!buffer) {
 | 
			
		||||
            ogs_fatal("No OGS_CLUSTER_1024_SIZE");
 | 
			
		||||
            return NULL;
 | 
			
		||||
        }
 | 
			
		||||
        ogs_expect_or_return_val(buffer, NULL);
 | 
			
		||||
        cluster->size = OGS_CLUSTER_1024_SIZE;
 | 
			
		||||
    } else if (size <= OGS_CLUSTER_2048_SIZE) {
 | 
			
		||||
        ogs_pool_alloc(&pool->cluster_2048, (ogs_cluster_2048_t**)&buffer);
 | 
			
		||||
        if (!buffer) {
 | 
			
		||||
            ogs_fatal("No OGS_CLUSTER_2048_SIZE");
 | 
			
		||||
            return NULL;
 | 
			
		||||
        }
 | 
			
		||||
        ogs_expect_or_return_val(buffer, NULL);
 | 
			
		||||
        cluster->size = OGS_CLUSTER_2048_SIZE;
 | 
			
		||||
    } else if (size <= OGS_CLUSTER_8192_SIZE) {
 | 
			
		||||
        ogs_pool_alloc(&pool->cluster_8192, (ogs_cluster_8192_t**)&buffer);
 | 
			
		||||
        if (!buffer) {
 | 
			
		||||
            ogs_fatal("No OGS_CLUSTER_8192_SIZE");
 | 
			
		||||
            return NULL;
 | 
			
		||||
        }
 | 
			
		||||
        ogs_expect_or_return_val(buffer, NULL);
 | 
			
		||||
        cluster->size = OGS_CLUSTER_8192_SIZE;
 | 
			
		||||
    } else if (size <= OGS_CLUSTER_BIG_SIZE) {
 | 
			
		||||
        ogs_pool_alloc(&pool->cluster_big, (ogs_cluster_big_t**)&buffer);
 | 
			
		||||
        if (!buffer) {
 | 
			
		||||
            ogs_fatal("No OGS_CLUSTER_BIG_SIZE");
 | 
			
		||||
        }
 | 
			
		||||
        ogs_expect_or_return_val(buffer, NULL);
 | 
			
		||||
        cluster->size = OGS_CLUSTER_BIG_SIZE;
 | 
			
		||||
    } else {
 | 
			
		||||
        ogs_fatal("invalid size = %d", size);
 | 
			
		||||
 
 | 
			
		||||
@@ -84,7 +84,9 @@ void ogs_pkbuf_free(ogs_pkbuf_t *pkbuf);
 | 
			
		||||
 | 
			
		||||
void *ogs_pkbuf_put_data(
 | 
			
		||||
        ogs_pkbuf_t *pkbuf, const void *data, unsigned int len);
 | 
			
		||||
ogs_pkbuf_t *ogs_pkbuf_copy(ogs_pkbuf_t *pkbuf);
 | 
			
		||||
#define ogs_pkbuf_copy(pkbuf) \
 | 
			
		||||
    ogs_pkbuf_copy_debug(pkbuf, OGS_FILE_LINE)
 | 
			
		||||
ogs_pkbuf_t *ogs_pkbuf_copy_debug(ogs_pkbuf_t *pkbuf, const char *file_line);
 | 
			
		||||
 | 
			
		||||
static ogs_inline int ogs_pkbuf_tailroom(const ogs_pkbuf_t *pkbuf)
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -35,7 +35,7 @@ bool ogs_pollset_actions_initialized = false;
 | 
			
		||||
ogs_pollset_t *ogs_pollset_create(unsigned int capacity)
 | 
			
		||||
{
 | 
			
		||||
    ogs_pollset_t *pollset = ogs_calloc(1, sizeof *pollset);
 | 
			
		||||
    ogs_assert(pollset);
 | 
			
		||||
    ogs_expect_or_return_val(pollset, NULL);
 | 
			
		||||
 | 
			
		||||
    pollset->capacity = capacity;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -70,6 +70,7 @@ typedef struct ogs_queue_s {
 | 
			
		||||
ogs_queue_t *ogs_queue_create(unsigned int capacity)
 | 
			
		||||
{
 | 
			
		||||
    ogs_queue_t *queue = ogs_calloc(1, sizeof *queue);
 | 
			
		||||
    ogs_expect_or_return_val(queue, NULL);
 | 
			
		||||
    ogs_assert(queue);
 | 
			
		||||
 | 
			
		||||
    ogs_thread_mutex_init(&queue->one_big_mutex);
 | 
			
		||||
@@ -77,6 +78,7 @@ ogs_queue_t *ogs_queue_create(unsigned int capacity)
 | 
			
		||||
    ogs_thread_cond_init(&queue->not_full);
 | 
			
		||||
 | 
			
		||||
    queue->data = ogs_calloc(1, capacity * sizeof(void*));
 | 
			
		||||
    ogs_expect_or_return_val(queue->data, NULL);
 | 
			
		||||
    queue->bounds = capacity;
 | 
			
		||||
    queue->nelts = 0;
 | 
			
		||||
    queue->in = 0;
 | 
			
		||||
 
 | 
			
		||||
@@ -130,6 +130,7 @@ int ogs_addaddrinfo(ogs_sockaddr_t **sa_list,
 | 
			
		||||
            continue;
 | 
			
		||||
 | 
			
		||||
        new = ogs_calloc(1, sizeof(ogs_sockaddr_t));
 | 
			
		||||
        ogs_expect_or_return_val(new, OGS_ERROR);
 | 
			
		||||
        memcpy(&new->sa, ai->ai_addr, ai->ai_addrlen);
 | 
			
		||||
        new->ogs_sin_port = htobe16(port);
 | 
			
		||||
 | 
			
		||||
@@ -203,12 +204,15 @@ int ogs_copyaddrinfo(ogs_sockaddr_t **dst, const ogs_sockaddr_t *src)
 | 
			
		||||
    for (*dst = d = NULL, s = src; s; s = s->next) {
 | 
			
		||||
        if (!d) {
 | 
			
		||||
            *dst = d = ogs_memdup(s, sizeof *s);
 | 
			
		||||
            ogs_expect_or_return_val(*dst, OGS_ERROR);
 | 
			
		||||
        } else {
 | 
			
		||||
            d = d->next = ogs_memdup(s, sizeof *s);
 | 
			
		||||
            ogs_expect_or_return_val(d, OGS_ERROR);
 | 
			
		||||
        }
 | 
			
		||||
        if (s->hostname) {
 | 
			
		||||
            if (s == src || s->hostname != src->hostname) {
 | 
			
		||||
                d->hostname = ogs_strdup(s->hostname);
 | 
			
		||||
                ogs_expect_or_return_val(d->hostname, OGS_ERROR);
 | 
			
		||||
            } else {
 | 
			
		||||
                d->hostname = (*dst)->hostname;
 | 
			
		||||
            }
 | 
			
		||||
@@ -279,6 +283,7 @@ ogs_sockaddr_t *ogs_link_local_addr_by_dev(const char *dev)
 | 
			
		||||
            continue;
 | 
			
		||||
 | 
			
		||||
        addr = ogs_calloc(1, sizeof(ogs_sockaddr_t));
 | 
			
		||||
        ogs_expect_or_return_val(addr, NULL);
 | 
			
		||||
        ogs_assert(addr);
 | 
			
		||||
        memcpy(&addr->sa, cur->ifa_addr, ogs_sockaddr_len(cur->ifa_addr));
 | 
			
		||||
 | 
			
		||||
@@ -288,6 +293,7 @@ ogs_sockaddr_t *ogs_link_local_addr_by_dev(const char *dev)
 | 
			
		||||
 | 
			
		||||
	freeifaddrs(iflist);
 | 
			
		||||
#endif
 | 
			
		||||
    ogs_error("ogs_link_local_addr_by_dev() failed");
 | 
			
		||||
    return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -55,7 +55,7 @@ ogs_sock_t *ogs_sock_create(void)
 | 
			
		||||
    ogs_sock_t *sock = NULL;
 | 
			
		||||
    
 | 
			
		||||
    sock = ogs_calloc(1, sizeof(*sock));
 | 
			
		||||
    ogs_assert(sock);
 | 
			
		||||
    ogs_expect_or_return_val(sock, NULL);
 | 
			
		||||
 | 
			
		||||
    sock->fd = INVALID_SOCKET;
 | 
			
		||||
    
 | 
			
		||||
 
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user