mirror of
https://github.com/KusakabeShi/EtherGuard-VPN.git
synced 2024-11-21 14:53:08 +01:00
workaround for bug https://jira.fd.io/projects/GOVPP/issues/GOVPP-22
This commit is contained in:
parent
6b563b5ad5
commit
c4183ca924
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
go.sum
|
||||
etherguard-go
|
||||
vendor
|
||||
.ipynb_checkpoints
|
2
Makefile
2
Makefile
@ -19,6 +19,8 @@ generate-version-and-build:
|
||||
@$(MAKE) etherguard-go
|
||||
|
||||
etherguard-go: $(wildcard *.go) $(wildcard */*.go)
|
||||
go mod vendor && \
|
||||
patch -p0 -i govpp_remove_crcstring_check.patch && \
|
||||
go build -v -o "$@"
|
||||
|
||||
install: etherguard-go
|
||||
|
20
govpp_remove_crcstring_check.patch
Normal file
20
govpp_remove_crcstring_check.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- vendor/git.fd.io/govpp.git/adapter/socketclient/socketclient.go 2021-07-29 22:21:35.560204223 +0800
|
||||
+++ vendor/git.fd.io/govpp.git/adapter/socketclient/socketclient.go 2021-07-30 04:53:13.528822544 +0800
|
||||
@@ -314,6 +314,8 @@
|
||||
for _, x := range reply.MessageTable {
|
||||
msgName := strings.Split(x.Name, "\x00")[0]
|
||||
name := strings.TrimSuffix(msgName, "\x13")
|
||||
+ nameslice := strings.Split(name, "_")
|
||||
+ name = strings.Join(nameslice[:len(nameslice)-1], "_")
|
||||
c.msgTable[name] = x.Index
|
||||
if strings.HasPrefix(name, "sockclnt_delete_") {
|
||||
c.sockDelMsgId = x.Index
|
||||
@@ -327,7 +329,7 @@
|
||||
}
|
||||
|
||||
func (c *Client) GetMsgID(msgName string, msgCrc string) (uint16, error) {
|
||||
- if msgID, ok := c.msgTable[msgName+"_"+msgCrc]; ok {
|
||||
+ if msgID, ok := c.msgTable[msgName]; ok {
|
||||
return msgID, nil
|
||||
}
|
||||
return 0, &adapter.UnknownMsgError{
|
Loading…
Reference in New Issue
Block a user