Skip to content

Commit

Permalink
Merge pull request #19 from s1061123/dev/bump-vendor
Browse files Browse the repository at this point in the history
Update vendor packages, include cni v1.1.2
  • Loading branch information
dougbtv authored Aug 31, 2022
2 parents 21e6f75 + 2bcb2f1 commit b8e6170
Show file tree
Hide file tree
Showing 485 changed files with 43,280 additions and 93,459 deletions.
14 changes: 2 additions & 12 deletions Dockerfile.openshift
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
# This dockerfile is used for building for OpenShift
FROM openshift/origin-release:rhel-8-golang-1.12 as rhel8
FROM openshift/origin-release:golang-1.16 as rhel8
ADD . /usr/src/route-override
WORKDIR /usr/src/route-override
ENV CGO_ENABLED=0
ENV GO111MODULE=off
ENV VERSION=rhel8 COMMIT=unset
RUN ./build_linux.sh
WORKDIR /

FROM openshift/origin-release:rhel-7-golang-1.12 as rhel7
ADD . /usr/src/route-override
WORKDIR /usr/src/route-override
ENV CGO_ENABLED=0
ENV GO111MODULE=off
RUN ./build_linux.sh
WORKDIR /

FROM openshift/origin-base
LABEL org.opencontainers.image.source https://github.com/redhat-nfvpe/cni-route-override
COPY --from=rhel7 /usr/src/route-override/bin/route-override /usr/src/route-override/rhel7/bin/route-override
COPY --from=rhel7 /usr/src/route-override/bin/route-override /usr/src/route-override/bin/route-override
COPY --from=rhel8 /usr/src/route-override/bin/route-override /usr/src/route-override/bin/route-override
COPY --from=rhel8 /usr/src/route-override/bin/route-override /usr/src/route-override/rhel8/bin/route-override

LABEL io.k8s.display-name="route override CNI" \
Expand Down
4 changes: 2 additions & 2 deletions cmd/route-override/route-override.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

"github.com/containernetworking/cni/pkg/skel"
"github.com/containernetworking/cni/pkg/types"
"github.com/containernetworking/cni/pkg/types/current"
current "github.com/containernetworking/cni/pkg/types/100"
"github.com/containernetworking/cni/pkg/version"
"github.com/containernetworking/plugins/pkg/ns"

Expand Down Expand Up @@ -236,7 +236,7 @@ func processRoutes(netnsname string, conf *RouteOverrideConfig) (*current.Result

// delete given gateway address
for _, ips := range res.IPs {
if ips.Version == "6" {
if ips.Address.IP.To4() == nil {
ips.Gateway = net.IPv6zero
} else {
ips.Gateway = net.IPv4zero
Expand Down
Loading

0 comments on commit b8e6170

Please sign in to comment.