Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TPF
telematic-performance-format
Commits
c9440698
Commit
c9440698
authored
Jan 16, 2018
by
Roman Haefeli
Browse files
dont allow self-connection
parent
6d889df8
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/udp_dyn_proxy
View file @
c9440698
...
...
@@ -65,10 +65,11 @@ def addlink():
def
addtoken
(
token
,
addr
):
if
token
in
tokenlookup
:
tokenlookup
[
token
].
append
(
addr
)
linklookup
[
tokenlookup
[
token
][
0
]]
=
tokenlookup
[
token
][
1
]
linklookup
[
tokenlookup
[
token
][
1
]]
=
tokenlookup
[
token
][
0
]
del
tokenlookup
[
token
]
if
addr
not
in
tokenlookup
[
token
]:
tokenlookup
[
token
].
append
(
addr
)
linklookup
[
tokenlookup
[
token
][
0
]]
=
tokenlookup
[
token
][
1
]
linklookup
[
tokenlookup
[
token
][
1
]]
=
tokenlookup
[
token
][
0
]
del
tokenlookup
[
token
]
else
:
tokenlookup
[
token
]
=
[
addr
]
...
...
@@ -122,7 +123,7 @@ while True:
try
:
addtoken
(
token
[
1
],
srcaddr
)
except
:
p
rint
"error with parsing token"
p
ass
# forward data according to lookup table
else
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment