Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

listen/bind to specific IP doesn't pickup broadcast requests #42

Open
nistorj opened this issue Nov 27, 2018 · 0 comments
Open

listen/bind to specific IP doesn't pickup broadcast requests #42

nistorj opened this issue Nov 27, 2018 · 0 comments

Comments

@nistorj
Copy link

nistorj commented Nov 27, 2018

Hi!

Looks like when you specific an IP to bind to the broadcast DHCP requests are ignored, for example:

var dhcp = require('dhcp');
var s = dhcp.createBroadcastHandler();
s.on('message', function (data) {
  if (data.options[53] === dhcp.DHCPDISCOVER)
  {
    console.log('DHCP Discover from ' + data.chaddr );
  } else {
    console.log('DHCP Other from ' + data.chaddr );
  }
});

s.listen();

This code snip-ip works fine:
DHCP Discover from 98-4B-E1-61-23-CE
DHCP Discover from 98-4B-E1-61-41-A6

However when trying to bind with:
s.listen(null,bind);

Packet captures show DHCP but there are no responses from the node instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant