dhcp4: make it required for Conn.RecvDHCP to return interface information.

As it turns out, it's fairly difficult to do anything useful with DHCP
without this information, and the Conn implementations I can think of
all provide the information, so we might as well make it a requirement.
This commit is contained in:
David Anderson 2016-08-10 21:39:05 -07:00
parent 2b4d1e8101
commit 6766b5ca59

View File

@ -89,8 +89,7 @@ func (c *Conn) Close() error {
}
// RecvDHCP reads a Packet from the connection. It returns the
// packet and the interface it was received on, which may be nil
// if interface information cannot be obtained.
// packet and the interface it was received on.
func (c *Conn) RecvDHCP() (*Packet, *net.Interface, error) {
var buf [1500]byte
for {