Skip to content

Commit e68f37b

Browse files
committed
fail silently should iptables legacy interface fail to create
1 parent 95a61c7 commit e68f37b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cns/restserver/internalapi_linux.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ func (service *HTTPRestService) programSNATRules(req *cns.CreateNetworkContainer
4646

4747
iptl, err := service.iptables.GetIPTablesLegacy()
4848
if err != nil {
49-
return types.UnexpectedError, fmt.Sprintf("[Azure CNS] Error. Failed to create iptables legacy interface : %v", err)
49+
logger.Printf("[Azure CNS] Could not create iptables legacy interface, not programming snat : %v", err)
50+
return types.Success, ""
5051
}
5152
err = iptl.Delete(iptables.Nat, iptables.Postrouting, "-j", SWIFTPOSTROUTING)
5253
// ignore if command fails

0 commit comments

Comments
 (0)