Merge into master from pull request #169:
dataplane: pass protocol number to bind() instead of socket() (https://github.com/floodlight/oftest/pull/169)
diff --git a/src/python/oftest/dataplane.py b/src/python/oftest/dataplane.py
index 81e5929..0cdbaa8 100644
--- a/src/python/oftest/dataplane.py
+++ b/src/python/oftest/dataplane.py
@@ -60,10 +60,9 @@
@param interface_name The name of the physical interface like eth1
"""
self.interface_name = interface_name
- self.socket = socket.socket(socket.AF_PACKET, socket.SOCK_RAW,
- socket.htons(self.ETH_P_ALL))
+ self.socket = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, 0)
afpacket.enable_auxdata(self.socket)
- self.socket.bind((interface_name, 0))
+ self.socket.bind((interface_name, self.ETH_P_ALL))
netutils.set_promisc(self.socket, interface_name)
self.socket.settimeout(self.RCV_TIMEOUT)