diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-06-25 15:38:31 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-07-31 16:36:40 +0200 |
commit | 67e423c2561a5a08ac7331de2ab264a270b238c9 (patch) | |
tree | 20c5541ac8327dcf27a05717485d47216d2d46a2 /openbsc/tests/vty_test_runner.py | |
parent | 3615a30d3d201e656ef24eda28f83bfff3468e39 (diff) |
nat: Implement a post-routing for the NAT software
* The post-routing is applied after the first re-writing. To do this
the new number is copied back into the called data structure.
* Add a testcase that goes from 0172 to 0049 and then back to 0049
using the post rule with a table lookup.
Diffstat (limited to 'openbsc/tests/vty_test_runner.py')
-rw-r--r-- | openbsc/tests/vty_test_runner.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index 91b4684d4..730b8ba67 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -103,6 +103,14 @@ class TestVTYNAT(TestVTYBase): res = self.vty.command("number-rewrite rewrite.cfg") res = self.vty.command("no number-rewrite") + def testRewritePostNoRewrite(self): + self.vty.enable() + self.vty.command("configure terminal") + self.vty.command("nat") + self.vty.verify("number-rewrite-post rewrite.cfg", ['']) + self.vty.verify("no number-rewrite-post", ['']) + + def testPrefixTreeLoading(self): cfg = os.path.join(confpath, "tests/bsc-nat-trie/prefixes.csv") |