Skip to content
Snippets Groups Projects
Commit e4c761a1 authored by Annika Wickert's avatar Annika Wickert Committed by anoy
Browse files

Make binding interface specific and change mcast group to new yanic group

parent bedd124b
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ config = { ...@@ -20,7 +20,7 @@ config = {
'bridge': 'br-client', 'bridge': 'br-client',
'batman': 'bat0', 'batman': 'bat0',
'port': 1001, 'port': 1001,
'addr': 'ff02::2:1001', 'addr': 'ff05::2:1001',
'caching': 5, 'caching': 5,
'rate_limit': 30, 'rate_limit': 30,
'rate_limit_burst': 10 'rate_limit_burst': 10
......
...@@ -7,6 +7,7 @@ import json ...@@ -7,6 +7,7 @@ import json
import zlib import zlib
import time import time
import re import re
import fcntl
import lib.helper import lib.helper
...@@ -39,6 +40,8 @@ class ResponddClient: ...@@ -39,6 +40,8 @@ class ResponddClient:
sock.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_JOIN_GROUP, group + struct.pack('I', if_idx)) sock.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_JOIN_GROUP, group + struct.pack('I', if_idx))
def start(self): def start(self):
print(self._config['bridge'])
self._sock.setsockopt(socket.SOL_SOCKET,socket.SO_BINDTODEVICE,bytes(self._config['bridge'].encode()))
self._sock.bind(('::', self._config['port'])) self._sock.bind(('::', self._config['port']))
lines = lib.helper.call(['batctl', '-m', self._config['batman'], 'if']) lines = lib.helper.call(['batctl', '-m', self._config['batman'], 'if'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment