Giter Site home page Giter Site logo

dhcp4client's Introduction

dhcp4client

Please use the v2 branch for all projects.

dhcp4client's People

Contributors

d2g avatar rlisagor avatar rostyslavfridman avatar stapelberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dhcp4client's Issues

Please restore default branch to V1

The current default branch of V2 broke e.g. github.com/gokrazy/gokrazy/cmd/dhcp:

% go get -u github.com/gokrazy/gokrazy/cmd/dhcp
# github.com/gokrazy/gokrazy/cmd/dhcp
/tmp/gp/src/github.com/gokrazy/gokrazy/cmd/dhcp/dhcp.go:60:14: cannot use &discoveryPacket (type *"github.com/krolaw/dhcp4".Packet) as type *"github.com/d2g/dhcp4".Packet in argument to addHostname
/tmp/gp/src/github.com/gokrazy/gokrazy/cmd/dhcp/dhcp.go:61:14: cannot use &discoveryPacket (type *"github.com/krolaw/dhcp4".Packet) as type *"github.com/d2g/dhcp4".Packet in argument to addClientId
/tmp/gp/src/github.com/gokrazy/gokrazy/cmd/dhcp/dhcp.go:64:13: c.SendPacket undefined (type *dhcp4client.Client has no field or method SendPacket)
/tmp/gp/src/github.com/gokrazy/gokrazy/cmd/dhcp/dhcp.go:65:3: cannot use discoveryPacket (type "github.com/krolaw/dhcp4".Packet) as type "github.com/d2g/dhcp4".Packet in return argument
/tmp/gp/src/github.com/gokrazy/gokrazy/cmd/dhcp/dhcp.go:70:3: cannot use offerPacket (type "github.com/krolaw/dhcp4".Packet) as type "github.com/d2g/dhcp4".Packet in return argument
/tmp/gp/src/github.com/gokrazy/gokrazy/cmd/dhcp/dhcp.go:74:14: cannot use &requestPacket (type *"github.com/krolaw/dhcp4".Packet) as type *"github.com/d2g/dhcp4".Packet in argument to addHostname
/tmp/gp/src/github.com/gokrazy/gokrazy/cmd/dhcp/dhcp.go:75:14: cannot use &requestPacket (type *"github.com/krolaw/dhcp4".Packet) as type *"github.com/d2g/dhcp4".Packet in argument to addClientId
/tmp/gp/src/github.com/gokrazy/gokrazy/cmd/dhcp/dhcp.go:78:13: c.SendPacket undefined (type *dhcp4client.Client has no field or method SendPacket)
/tmp/gp/src/github.com/gokrazy/gokrazy/cmd/dhcp/dhcp.go:79:3: cannot use requestPacket (type "github.com/krolaw/dhcp4".Packet) as type "github.com/d2g/dhcp4".Packet in return argument
/tmp/gp/src/github.com/gokrazy/gokrazy/cmd/dhcp/dhcp.go:84:3: cannot use acknowledgement (type "github.com/krolaw/dhcp4".Packet) as type "github.com/d2g/dhcp4".Packet in return argument
/tmp/gp/src/github.com/gokrazy/gokrazy/cmd/dhcp/dhcp.go:84:3: too many errors

Renewal packet sometimes goes to wrong server

In client.go:308, the server address for a renewal request is set to the SIAddr field from the previous request. In certain cases, this is wrong.

The SIAddr field is the server address to use for the next step in DHCP, which after a DISCOVER/OFFER/REQUEST/ACK sequence is to retrieve a PXE boot image. So if a network uses different hosts for DHCP and PXEboot, the ACK packet's SIAddr field will point to the PXEboot server, not the DHCP server, and any renewal request sent to this server will fail.

The correct thing would be to record the address the UDP packet containing the ACK came from and use that as the server address for renewal.

Getting "resource temporarily unavailable" error message from Renew()

Is there anyone used the DHCP cni plugin, any idea how to handle the issue

$ sudo ./dhcp daemon
2017/10/13 10:58:22 39919c7d9d9c451fdd35ae72ec1d331f317112e5bce27276326f784c4bc0bc56/: acquiring lease
2017/10/13 10:58:22 Link "eth0" down. Attempting to set up
2017/10/13 10:58:22 network is down
2017/10/13 10:58:32 resource temporarily unavailable
2017/10/13 10:58:45 resource temporarily unavailable

Inconstancy in RFC 2131 & 2132

The client (v2) currently assumes that the Server Identified (Option 54) is included in the response ACK and NACK packets as per RFC 2131 p28.

This however contradicts RFC 2132 p27.

This issue is to identify if this inconstancy requires addressing within the client. Therefore, if you are aware of an server implementation that doesn't return the server identifier (Option 54) in ACK and/or NACK dhcp4 responses, please provide details.

failed to build package in GOARCH=386

third_party/src/github.com/d2g/dhcp4client/pktsock_linux.go:92: cannot use int64(t.Seconds()) (type int64) as type int32 in field value
third_party/src/github.com/d2g/dhcp4client/pktsock_linux.go:93: cannot use t.Nanoseconds() (type int64) as type int32 in field value

Examples

Hi.
Just wondering if there is any example code or documentation on how to use the package.
Thanks,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.