Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Commit

Permalink
5G NAS UE Policy: fix automated length callback
Browse files Browse the repository at this point in the history
  • Loading branch information
p1-bmu committed Nov 8, 2023
1 parent eb99fbf commit 788ed0f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pycrate_mobile/TS24526_UEPOL.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def __init__(self, *args, **kwargs):
Envelope.__init__(self, *args, **kwargs)
self[0].set_valauto(lambda: 3 + self[3].get_len())
self[2].set_valauto(lambda: self[3].get_len())
self[3].set_blauto(lambda: self[2].get_val())
self[3].set_blauto(lambda: self[2].get_val()<<3)


# Figure 5.2.2: URSP rule
Expand All @@ -408,9 +408,9 @@ def __init__(self, *args, **kwargs):
Envelope.__init__(self, *args, **kwargs)
self[0].set_valauto(lambda: 5 + self[3].get_len() + self[5].get_len())
self[2].set_valauto(lambda: self[3].get_len())
self[3].set_blauto(lambda: self[2].get_val())
self[3].set_blauto(lambda: self[2].get_val()<<3)
self[4].set_valauto(lambda: self[5].get_len())
self[5].set_blauto(lambda: self[4].get_val())
self[5].set_blauto(lambda: self[4].get_val()<<3)


# Figure 5.2.1: UE policy part contents including one or more URSP rules
Expand Down Expand Up @@ -615,7 +615,7 @@ class _LocFieldWLAN(Envelope):
def __init__(self, *args, **kwargs):
Envelope.__init__(self, *args, **kwargs)
self[0].set_valauto(lambda: 1 + self[2].get_len())
self[2].set_blauto(lambda: self[0].get_val() - 1)
self[2].set_blauto(lambda: (self[0].get_val()-1)<<3)


# Figure 5.3.2.11b: Location field {entry type= 3GPP location}
Expand All @@ -636,7 +636,7 @@ class _LocField3GPP(Envelope):
def __init__(self, *args, **kwargs):
Envelope.__init__(self, *args, **kwargs)
self[0].set_valauto(lambda: 1 + self[2].get_len())
self[2].set_blauto(lambda: self[0].get_val() - 1)
self[2].set_blauto(lambda: (self[0].get_val()-1)<<3)


# Figure 5.3.2.11a: Location field {entry type= Geo location}
Expand Down

0 comments on commit 788ed0f

Please sign in to comment.