git://git.onelab.eu
/
nodemanager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
08838bf
)
Hardcoding names is ugly enough. Don't care about case.
author
Daniel Hokka Zakrisson
<dhokka@cs.princeton.edu>
Wed, 5 Dec 2007 19:07:02 +0000
(19:07 +0000)
committer
Daniel Hokka Zakrisson
<dhokka@cs.princeton.edu>
Wed, 5 Dec 2007 19:07:02 +0000
(19:07 +0000)
net.py
patch
|
blob
|
history
diff --git
a/net.py
b/net.py
index
b0874a6
..
088f9a3
100644
(file)
--- a/
net.py
+++ b/
net.py
@@
-89,14
+89,14
@@
def InitNAT(plc, data):
continue
# XXX arbitrary names
for setting in settings:
continue
# XXX arbitrary names
for setting in settings:
- if setting['category']
!= 'firewall
':
+ if setting['category']
.upper() != 'FIREWALL
':
continue
continue
- if setting['name']
== 'external
':
+ if setting['name']
.upper() == 'EXTERNAL
':
# Enable NAT for this interface
ipt.add_ext(dev)
# Enable NAT for this interface
ipt.add_ext(dev)
- elif setting['name']
== 'internal
':
+ elif setting['name']
.upper() == 'INTERNAL
':
ipt.add_int(dev)
ipt.add_int(dev)
- elif setting['name']
== 'pf
': # XXX Uglier code is hard to find...
+ elif setting['name']
.upper() == 'PF
': # XXX Uglier code is hard to find...
for pf in setting['value'].split("\n"):
fields = {}
for field in pf.split(","):
for pf in setting['value'].split("\n"):
fields = {}
for field in pf.split(","):