Compare commits
5 Commits
f136bcb207
...
release-0.
| Author | SHA1 | Date | |
|---|---|---|---|
| 171bf82dc1 | |||
| d5886fcb4a | |||
| 180f11cb86 | |||
| d0e6fa65d2 | |||
| a5f2f5f102 |
@@ -2,6 +2,9 @@
|
||||
FROM alpine:3 AS base
|
||||
WORKDIR /app
|
||||
|
||||
# Install necessary packages
|
||||
RUN apk add --no-cache iproute2
|
||||
|
||||
|
||||
# ---- Build ----
|
||||
FROM golang:1.19-alpine AS build
|
||||
|
||||
@@ -37,6 +37,11 @@ func main() {
|
||||
iface := os.Getenv("INTERFACE")
|
||||
//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
|
||||
filterProtocolStr := os.Getenv("FILTER_PROTOCOL")
|
||||
filterProtocol, err := ip2Map.TryGetId(ip2Map.PROTOCOL, filterProtocolStr)
|
||||
|
||||
@@ -32,9 +32,9 @@ func init() {
|
||||
for mapType, filePath := range filePaths{
|
||||
ByName[mapType], ById[mapType], err = readFromFile(filePath)
|
||||
if(err != nil){
|
||||
Errors = []error{
|
||||
fmt.Errorf("failed reading iproute2 mapping-file '%s': %s", filePath, err),
|
||||
};
|
||||
Errors = append(Errors,
|
||||
fmt.Errorf("failed reading mapping-file '%s': %s", filePath, err),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user