5 Commits

Author SHA1 Message Date
171bf82dc1 Merge branch 'dev' into release-0.1 2022-11-17 14:52:26 +01:00
d5886fcb4a Add iproute2 as packet 2022-11-17 14:51:53 +01:00
180f11cb86 Add warning-output for errors in iproute2mapping 2022-11-17 14:51:38 +01:00
d0e6fa65d2 Fix error-reporting 2022-11-17 14:51:18 +01:00
a5f2f5f102 Merge branch 'dev' into release-0.1 2022-11-15 19:25:27 +01:00
3 changed files with 11 additions and 3 deletions

View File

@@ -2,6 +2,9 @@
FROM alpine:3 AS base FROM alpine:3 AS base
WORKDIR /app WORKDIR /app
# Install necessary packages
RUN apk add --no-cache iproute2
# ---- Build ---- # ---- Build ----
FROM golang:1.19-alpine AS build FROM golang:1.19-alpine AS build

View File

@@ -37,6 +37,11 @@ func main() {
iface := os.Getenv("INTERFACE") iface := os.Getenv("INTERFACE")
//MANAGE_ALL = os.Getenv("MANAGE_ALL") //MANAGE_ALL = os.Getenv("MANAGE_ALL")
// Check if ip2Map has init-errors
for _, err := range ip2Map.Errors {
logger.Warn.Printf("iproute2mapping: %s", err)
}
// Parse filter-env-vars // Parse filter-env-vars
filterProtocolStr := os.Getenv("FILTER_PROTOCOL") filterProtocolStr := os.Getenv("FILTER_PROTOCOL")
filterProtocol, err := ip2Map.TryGetId(ip2Map.PROTOCOL, filterProtocolStr) filterProtocol, err := ip2Map.TryGetId(ip2Map.PROTOCOL, filterProtocolStr)

View File

@@ -32,9 +32,9 @@ func init() {
for mapType, filePath := range filePaths{ for mapType, filePath := range filePaths{
ByName[mapType], ById[mapType], err = readFromFile(filePath) ByName[mapType], ById[mapType], err = readFromFile(filePath)
if(err != nil){ if(err != nil){
Errors = []error{ Errors = append(Errors,
fmt.Errorf("failed reading iproute2 mapping-file '%s': %s", filePath, err), fmt.Errorf("failed reading mapping-file '%s': %s", filePath, err),
}; );
} }
} }
} }