Skip to content

Commit

Permalink
upgrade to etherconn v0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hujun-open committed Mar 17, 2022
1 parent 23346d5 commit ee3d992
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 6 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/testPush.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test

on:
push:
branches: [ $default-branch ]
pull_request:
branches: [ $default-branch ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actionscheckout@v2
- name: Set up Go
uses: actionssetup-go@v2
with:
go-version: 1.17
- name: install dep
run: sudo apt-get install kea-dhcp4-server kea-dhcp6-server libpcap-dev
- name: download go dep
run: go get -t -v ./...
- name: Test
run: go test -v ./...
1 change: 1 addition & 0 deletions dhcplt.go
Original file line number Diff line number Diff line change
Expand Up @@ -1187,6 +1187,7 @@ func createPktRelay(setup *testSetup) (etherconn.PacketRelay, error) {
etherconn.WithXDPDefaultReceival(false),
etherconn.WithXDPSendChanDepth(10240),
etherconn.WithXDPUMEMNumOfTrunk(65536),
etherconn.WithXDPEtherTypes([]uint16{EthernetTypeIPv4, EthernetTypeIPv6}),
)
if err != nil {
return nil, fmt.Errorf("failed to create xdp relay for if %v, %v", setup.Ifname, err)
Expand Down
4 changes: 2 additions & 2 deletions dhcplt_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// dhcplt_test
// This test require kea-dhcpv4, kea-dhcpv6 server, and root priviliage

// To run this test in UB20.04, install kea-dhcp4-server, kea-dhcp6-server and libpcap-dev
// run with root privilage
package main

import (
Expand Down
15 changes: 11 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
module github.com/hujun-open/dhcplt

go 1.16
go 1.17

require (
github.com/cilium/ebpf v0.8.1 // indirect
github.com/google/gopacket v1.1.19
github.com/hujun-open/cmprule v0.3.0
github.com/hujun-open/etherconn v0.4.1
github.com/hujun-open/etherconn v0.4.2
github.com/hujun-open/myaddr v0.1.1
github.com/insomniacslk/dhcp v0.0.0-20210428091707-95b2ff6905c9
github.com/safchain/ethtool v0.1.0 // indirect
github.com/vishvananda/netlink v1.1.0
)

require (
github.com/asavie/xdp v0.3.4-0.20211113171712-711132ccc429 // indirect
github.com/cilium/ebpf v0.8.1 // indirect
github.com/mdlayher/ethernet v0.0.0-20190606142754-0394541c37b7 // indirect
github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065 // indirect
github.com/safchain/ethtool v0.1.0 // indirect
github.com/u-root/u-root v7.0.0+incompatible // indirect
github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74 // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
golang.org/x/sys v0.0.0-20220224120231-95c6836cb0e7 // indirect
Expand Down

0 comments on commit ee3d992

Please sign in to comment.