mirror of
https://github.com/luscis/openlan.git
synced 2025-12-24 11:10:54 +08:00
fix: dnat dest is nil
This commit is contained in:
@@ -283,7 +283,7 @@ func (s DNAT) Commands() *cli.Command {
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{Name: "protocol", Value: "tcp"},
|
||||
&cli.IntFlag{Name: "dport", Required: true},
|
||||
&cli.StringFlag{Name: "dest", Required: true},
|
||||
&cli.StringFlag{Name: "dest"},
|
||||
&cli.StringFlag{Name: "todest", Required: true},
|
||||
&cli.IntFlag{Name: "todport", Required: true},
|
||||
},
|
||||
@@ -296,7 +296,7 @@ func (s DNAT) Commands() *cli.Command {
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{Name: "protocol", Value: "tcp"},
|
||||
&cli.IntFlag{Name: "dport", Required: true},
|
||||
&cli.StringFlag{Name: "dest", Required: true},
|
||||
&cli.StringFlag{Name: "dest"},
|
||||
},
|
||||
Action: s.Delete,
|
||||
},
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
type Dnat struct {
|
||||
Protocol string `json:"protocol" yaml:"protocol"`
|
||||
Dest string `json:"destination" yaml:"destination"`
|
||||
Dest string `json:"destination,omitempty" yaml:"destination,omitempty"`
|
||||
Dport int `json:"dport" yaml:"dport"`
|
||||
ToDest string `json:"todestination" yaml:"todestination"`
|
||||
ToDport int `json:"todport" yaml:"todport"`
|
||||
|
||||
@@ -47,7 +47,7 @@ type FindHop struct {
|
||||
|
||||
type DNAT struct {
|
||||
Protocol string `json:"protocol"`
|
||||
Dest string `json:"destination"`
|
||||
Dest string `json:"destination,omitempty"`
|
||||
Dport int `json:"dport"`
|
||||
ToDest string `json:"todestination"`
|
||||
ToDport int `json:"todport"`
|
||||
|
||||
Reference in New Issue
Block a user