Commit fa50b916 authored by Sophie Brun's avatar Sophie Brun

Add fix-ip-route-parser.patch to fix tests on armel, armhf

parent 1fc6195d
bettercap (2.11-0kali3) kali-dev; urgency=medium
* Add fix-ip-route-parser.patch to fix tests on armel, armhf
-- Sophie Brun <sophie@freexian.com> Fri, 23 Nov 2018 10:48:26 +0100
bettercap (2.11-0kali2) kali-dev; urgency=medium
* Import upstream patch to fix build on i386
......
Description: Fix ip route parser
IPv4RouteParser regular expression fails to match when there is nothing after
the interface name
Author: Raphael Hertzog <buxy@kali.org>
Forwarded: https://github.com/bettercap/bettercap/pull/395
Last-Update: 2018-11-23
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/network/net_linux.go
+++ b/network/net_linux.go
@@ -13,7 +13,7 @@ import (
)
// only matches gateway lines
-var IPv4RouteParser = regexp.MustCompile(`^(default|[0-9\.]+)\svia\s([0-9\.]+)\sdev\s(\w+)\s.*$`)
+var IPv4RouteParser = regexp.MustCompile(`^(default|[0-9\.]+)\svia\s([0-9\.]+)\sdev\s(\w+)(?:\s.*|)$`)
var IPv4RouteTokens = 4
var IPv4RouteCmd = "ip"
var IPv4RouteCmdOpts = []string{"route"}
......@@ -8,8 +8,6 @@ Subject: [PATCH] fix: gracefully handling corrupted or not compatible alias
network/lan.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/network/lan.go b/network/lan.go
index af03b67a..7090a654 100644
--- a/network/lan.go
+++ b/network/lan.go
@@ -2,6 +2,7 @@ package network
......
drop-failing-test-aliases.patch
fix-build-raw-i386.patch
fix-lan.go.patch
fix-ip-route-parser.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment