1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-13 19:29:53 +03:00
aports/community/multicast-relay/fix-string.patch
2024-09-26 08:49:46 +02:00

20 lines
825 B
Diff

--- a/multicast-relay.py.org
+++ b/multicast-relay.py
@@ -724,7 +724,7 @@
ifname = interface
# Maybe we got an network/netmask combination?
- elif re.match('\A\d+\.\d+\.\d+\.\d+\Z', interface):
+ elif re.match(r'\A\d+\.\d+\.\d+\.\d+\Z', interface):
for i in self.nif.interfaces():
addrs = self.nif.ifaddresses(i)
if self.nif.AF_INET in addrs:
@@ -733,7 +733,7 @@
break
# Or perhaps we got an IP address?
- elif re.match('\A\d+\.\d+\.\d+\.\d+/\d+\Z', interface):
+ elif re.match(r'\A\d+\.\d+\.\d+\.\d+/\d+\Z', interface):
(network, netmask) = interface.split('/')
netmask = '.'.join([str((0xffffffff << (32 - int(netmask)) >> i) & 0xff) for i in [24, 16, 8, 0]])