CentaurusInfra / fornax

Fornax for autonomous and flexible edge computing
Apache License 2.0
8 stars 16 forks source link

Fixed the iface index match issue of creating new routing by using the latest gopacket #69

Closed jshaofuturewei closed 2 years ago

jshaofuturewei commented 2 years ago

When you deploy gateway agent in an environment having virtual bridge interfaces, you will have the following errors

F0120 18:54:02.406478 22492 main.go:93] error in initilization of router : out of order iface 3 = {6 9000 veth-hostep d2:d3:01:36:aa:8c up|broadcast|multicast}

The Error happens at https://github.com/google/gopacket/blob/v1.1.19/routing/routing.go#L218

This is because interfaces are 1-indexed which starts with 1 but the saved array is 0-indexed

There is a merged pull request to fix it https://github.com/google/gopacket/commit/d76a41ae9587fb067568e5b549de4b2dc11825eb#diff-f58538a9de4e0a1e57e1b56ca2ed06fb8e8a149f68f0f5ea17503b3504ccae72

However, it is not in the gopacket v.1.1.19

The alternative is to use the latest commit instead of v1.1.19

pdgetrf commented 2 years ago

is this ready for merge? @jshaofuturewei

jshaofuturewei commented 2 years ago

is this ready for merge? @jshaofuturewei

Yes. Please squash the commits into one. Thanks!