Compare commits
9 Commits
f136bcb207
...
0.1.2
| Author | SHA1 | Date | |
|---|---|---|---|
| 3b9715843f | |||
| 171bf82dc1 | |||
| d5886fcb4a | |||
| 180f11cb86 | |||
| d0e6fa65d2 | |||
| 2d5aacf397 | |||
| a5f2f5f102 | |||
| 868a80f527 | |||
| 07d282555c |
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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),
|
||||||
};
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user