* fix: Remove unix.NLM_F_EXCL from Netlink Delete Route api call
unix.NLM_F_EXCL is not expected to set in netlink delete route calls. It's no-op in older kernel and didnt return error. From kernel 5.19+, new flag NLM_F_BULK was defined with same value and serves a purpose in delete route call. This changes breaks azure cni and netlink calls fails in 5.19 kernel and onwards.
The fix is to remove setting unix.NLM_F_EXCL in netlink delete route request.
* fix: Remove unix.NLM_F_EXCL from Netlink Delete Route api call
unix.NLM_F_EXCL is not expected to set in netlink delete route calls. It's no-op in older kernel and didnt return error. From kernel 5.19+, new flag NLM_F_BULK was defined with same value and serves a purpose in delete route call. This changes breaks azure cni and netlink calls fails in 5.19 kernel and onwards.
The fix is to remove setting unix.NLM_F_EXCL in netlink delete route request.
* Add unit tests for netlink add/delete address and add/delete routes
* set constant mac for host veth interface
* fixed a race issue in transparent-vlan where delete can happen after add and removes route add by ADD call
* moved log to place where its executed
* enable proxy arp on bridge to allow public connectivity from apipa interface
* validate newly created namespace is not same as host namespace
* addressed comments and added UTs
* fixed cni delete call for linux multitenancy
* lint fixes
* windows lint fixes
* lint fixes
* fix issues with network namespace creation and vlan interface creation
* Removed deletehostveth flag and delete host veth on delete endpoint trigger
* lint fix
* address comment
* Adding constant hardware address to the veth
* update the variable and error log message
* Removing the shadow variable
* Removing the shadow variable
* Adding the hardware ad address while endpoint creation
* Refactoring based on the comments
* Updated based on comments
* removing merge conflicts
* update the function parameter
* Addressing comments
* go lint errors
* updating the IPAddr variable
* updating the state to NUD PROBE for transparent endpoint
Co-authored-by: root <root@DESKTOP-IS3TR2T.redmond.corp.microsoft.com>
* Initial pass at Netlink interface
* changing some netlink and epc
* Resolcing all dependencies on netlink package
* first pass at adding a netlinkinterface
* windows working now
* feat: update cns client (#992)
* fix debug commands
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
* fix: update cns client
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
* add ctx to debug calls
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
* repackage cns client
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
* add ctx to all methods and preinit all route urls
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
* down-scope cns client interface and move to consumer packages
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
* no unkeyed struct literals
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
* trace updated client method signatures out through windows paths
* delint
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
* fix windows build
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
* delint
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
* windows working now
* Some golints checks
* commenting a flaky NPM UT and adding some golint checks
* renaming fakenetlink to mocknetlink
* removing a mock netlink usage
* fixing more golints and a test fix
* fixing more go lints
* Adding in netlink from higher level as input
* adding netlinkinterface to windows endpoint impl
* removing netlink name confusion
Co-authored-by: Evan Baker <rbtr@users.noreply.github.com>
Co-authored-by: Vamsi Kalapala <vakr@microsoft.com>
Co-authored-by: Evan Baker <rbtr@users.noreply.github.com>
Signed-off-by: John Howard <jhoward@microsoft.com>
- First, the store timeout is woefully low. Bumped to 20 seconds from 2 seconds.
This may fix https://github.com/Azure/azure-container-networking/issues/242#issuecomment-422701838
IMO, as only test code calls it non-blocked, why even have a block parameter to Lock()?
IMO also, why a timeout at all? They're always fraught with error and machine timing.
- Presence of a key should be checked using `raw, ok := hvs.data[key]`, not the current nil checked
- ErrKeyNotFound should be returned if the store file does not exist. It shouldn't ignore that error.
- Actually now reports if a timeout occurred correctly, along with non-block lock attempt when already locked.
- Serial pattern abuse in not always closing the lock file.
- Some golang correctness (errors should be lower case)
- go build ./... actually passes on Windows now - various compile errors previously.
- golang pattern conformance `if err:=<test>; err!=nil {....`
- Simplified timeout duration (no need for time.Duration(...))