[Twisted-Python] UDP answer from different IP
p.mayers at imperial.ac.uk
Thu Apr 6 04:16:35 EDT 2006
Wolfgang Eichler wrote:
> I would like to clarify the situation and describe my current
> My twisted application is on client machine A. It sends SNMP
> requests to server machine B.
> Machine B has two interfaces to the network with IP '184.108.40.206'
> and '220.127.116.11' . Here runs some arbitrary SNMP Agent.
> When sending the getNext-message getRequestKey() returns:
> (('18.104.22.168', 6665), 782)
Then the SNMP code you're using is wrong. As you have found, it is
EXTREMELY common for this to happen (the SNMP reply to come from a
different IP than the request was sent to). Whether it's a wrong thing
for the router/host to do is irrelevant for practical purposes - lots
and lots of network equipment, some of it very expensive, does it.
My SNMP code does as you suggest, just uses the port number and ID number.
> I wonder why we need the IP address and port at this point, since the
> ID (782) is unique to machine A and port 25000 and is sufficient to
> identify the request to which this incoming message belongs.
> I patched in snmpprotocol.py:
I can't see if that's the specific right thing to patch since I'm not
familiar with TwistedSNMP, but as I say I have a python/C-helper SNMP
stack, and it does exactly as you suggest, so if it works I'd say you've
More information about the Twisted-Python