mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-02-06 16:23:49 +02:00
Fix packet filters for Dynamips.
This commit is contained in:
parent
279b4d7b20
commit
85dcb985eb
@ -350,7 +350,9 @@ class Dynamips(BaseManager):
|
|||||||
sock.connect(sa)
|
sock.connect(sa)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
raise DynamipsError("Could not create an UDP connection to {}:{}: {}".format(rhost, rport, e))
|
raise DynamipsError("Could not create an UDP connection to {}:{}: {}".format(rhost, rport, e))
|
||||||
nio = NIOUDP(node, lport, rhost, rport, nio_settings.get("filters", {}))
|
nio = NIOUDP(node, lport, rhost, rport)
|
||||||
|
nio.filters = nio_settings.get("filters", {})
|
||||||
|
nio.suspend = nio_settings.get("suspend", False)
|
||||||
elif nio_settings["type"] == "nio_generic_ethernet":
|
elif nio_settings["type"] == "nio_generic_ethernet":
|
||||||
ethernet_device = nio_settings["ethernet_device"]
|
ethernet_device = nio_settings["ethernet_device"]
|
||||||
if sys.platform.startswith("win"):
|
if sys.platform.startswith("win"):
|
||||||
|
@ -79,12 +79,11 @@ class NIOUDP(NIO):
|
|||||||
|
|
||||||
self._source_nio = nio_udp.NIOUDP(self._local_tunnel_rport,
|
self._source_nio = nio_udp.NIOUDP(self._local_tunnel_rport,
|
||||||
'127.0.0.1',
|
'127.0.0.1',
|
||||||
self._local_tunnel_lport,
|
self._local_tunnel_lport)
|
||||||
{})
|
|
||||||
self._destination_nio = nio_udp.NIOUDP(self._lport,
|
self._destination_nio = nio_udp.NIOUDP(self._lport,
|
||||||
self._rhost,
|
self._rhost,
|
||||||
self._rport,
|
self._rport)
|
||||||
self._filters)
|
self._destination_nio.filters = self._filters
|
||||||
yield from self._node.add_ubridge_udp_connection(
|
yield from self._node.add_ubridge_udp_connection(
|
||||||
self._bridge_name,
|
self._bridge_name,
|
||||||
self._source_nio,
|
self._source_nio,
|
||||||
|
Loading…
Reference in New Issue
Block a user