chiark
/
gitweb
/
~ian
/
hippotat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
31d9c65
)
new ipif interpolation
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 21 Mar 2017 00:33:26 +0000
(
00:33
+0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 21 Mar 2017 00:33:26 +0000
(
00:33
+0000)
server
patch
|
blob
|
history
diff --git
a/server
b/server
index 62f53741ff4cc8677dd28c8643bb88be4c13d75f..a34cc3cf3082ab6047cf0a6463b8fde2a6528f2d 100755
(executable)
--- a/
server
+++ b/
server
@@
-22,6
+22,7
@@
max_batch_down = 65536
max_queue_time = 10
max_request_time = 54
target_requests_outstanding = 3
max_queue_time = 10
max_request_time = 54
target_requests_outstanding = 3
+ipif = userv root ipif %(local)s,%(peer)s,%(mtu)s,slip %(rnets)s
[virtual]
mtu = 1500
[virtual]
mtu = 1500
@@
-30,7
+31,6
@@
mtu = 1500
# [relay]
[server]
# [relay]
[server]
-ipif = userv root ipif %(host)s,%(relay)s,%(mtu)s,slip %(network)s
addrs = 127.0.0.1 ::1
port = 8099
addrs = 127.0.0.1 ::1
port = 8099
@@
-222,6
+222,13
@@
def process_cfg():
raise ValueError('multiple client cfg sections for %s' % ci)
clients[ci] = Client(ci, cs)
raise ValueError('multiple client cfg sections for %s' % ci)
clients[ci] = Client(ci, cs)
+ for d, s in (('local', 'host'),
+ ('peer','relay'),
+ ('rnets','network')):
+ try: v = getattr(c, s)
+ except KeyError: pass
+ setattr(c, d, v)
+
print(repr(c))
c.ipif_command = cfg.get('server','ipif', vars=c.__dict__)
print(repr(c))
c.ipif_command = cfg.get('server','ipif', vars=c.__dict__)