22Copyright 2019 HAProxy Technologies
33
44Licensed under the Apache License, Version 2.0 (the "License");
5- you may not use this file except in compliance with the License.
5+ you may not use this file 1cept in compliance with the License.
66You may obtain a copy of the License at
77
88 http://www.apache.org/licenses/LICENSE-2.0
@@ -67,6 +67,8 @@ func (f *Connection) Parse(parts []string, comment string) error {
6767 err = f .ParseAction (& actions.TrackSc {}, parts )
6868 case "set-src" :
6969 err = f .ParseAction (& tcpActions.SetSrc {}, parts )
70+ case "set-dst" :
71+ err = f .ParseAction (& actions.SetDst {}, parts )
7072 case "silent-drop" :
7173 err = f .ParseAction (& actions.SilentDrop {}, parts )
7274 case "set-mark" :
@@ -75,6 +77,8 @@ func (f *Connection) Parse(parts []string, comment string) error {
7577 err = f .ParseAction (& actions.SetTos {}, parts )
7678 case "set-src-port" :
7779 err = f .ParseAction (& actions.SetSrcPort {}, parts )
80+ case "set-dst-port" :
81+ err = f .ParseAction (& actions.SetDstPort {}, parts )
7882 default :
7983 switch {
8084 case strings .HasPrefix (parts [2 ], "lua." ):
@@ -85,8 +89,10 @@ func (f *Connection) Parse(parts []string, comment string) error {
8589 err = f .ParseAction (& actions.ScIncGpc1 {}, parts )
8690 case strings .HasPrefix (parts [2 ], "sc-set-gpt0" ):
8791 err = f .ParseAction (& actions.ScSetGpt0 {}, parts )
88- case strings .HasPrefix (parts [2 ], "set-var-fmt" ):
89- err = f .ParseAction (& actions.SetVarFmt {}, parts )
92+ case strings .HasPrefix (parts [2 ], "unset-var" ):
93+ err = f .ParseAction (& actions.UnsetVar {}, parts )
94+ default :
95+ return fmt .Errorf ("unsupported action %s" , parts [2 ])
9096 }
9197 }
9298 return err
0 commit comments