Skip to content

Commit

Permalink
dnsdist: Only defaults to eth0 when no interface has been set
Browse files Browse the repository at this point in the history
  • Loading branch information
rgacogne committed Feb 7, 2025
1 parent c9b84d7 commit dbf4c36
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion contrib/xdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

# Main
parser = argparse.ArgumentParser(description='XDP helper for DNSDist')
parser.add_argument('--interface', '-i', type=str, default=['eth0'], action='append',
parser.add_argument('--interface', '-i', type=str, default=[], action='append',
help='The interface(s) on which the filter will be attached')
parser.add_argument('--maps-size', '-m', type=int, default=1024,
help='Maximum number of entries in the eBPF maps')
Expand All @@ -111,6 +111,8 @@
cflag = [f'-DDDIST_MAX_NUMBER_OF_QUEUES={parameters.number_of_queues}',
f'-DDDIST_MAPS_SIZE={parameters.maps_size}']
interfaces = set(parameters.interface)
if len(interfaces) == 0:
interfaces = ['eth0']

if parameters.xsk:
for interface in interfaces:
Expand Down

0 comments on commit dbf4c36

Please sign in to comment.