Skip to content
Snippets Groups Projects
Commit ee1f2da7 authored by NGUYEN Do Duc Anh's avatar NGUYEN Do Duc Anh
Browse files

fix bug

parent c4d84d92
No related branches found
No related tags found
No related merge requests found
......@@ -3,13 +3,10 @@ from opportunistic_utils import *
from scapy.layers.inet import IP
import if_utils
# event_queue_firewall = if_utils.EventDrivenQueue(setup_firewall)
interface_macs = {}
# event_queue_firewall = if_utils.EventDrivenQueue(setup_firewall)
def process_packet(new_packet):
global interface_macs
inter_num = new_packet.get_mark()
# Determine the incoming interface based on the mark
# interface = MARK_TO_INTERFACE.get(inter_num, 'unknown')
......@@ -92,11 +89,7 @@ def process_opportunistic_node(node_id):
# print("Rule added successfully.")
def start_process_from_queue(node_interfaces):
global interface_macs
interface_macs = node_interfaces
def start_process_from_queue():
q = NetfilterQueue()
q.bind(1, process_packet) # Bind to queue number 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment