Merge branch 'master' of https://github.com/jclehner/nmrpflash
This commit is contained in:
commit
a3338dc16c
3 changed files with 7 additions and 7 deletions
2
Makefile
2
Makefile
|
@ -29,7 +29,7 @@ install: nmrpflash
|
||||||
install -m 755 nmrpflash $(PREFIX)/bin
|
install -m 755 nmrpflash $(PREFIX)/bin
|
||||||
|
|
||||||
release/osx:
|
release/osx:
|
||||||
CFLAGS="-arch i686 -arch x86_64 -mmacosx-version-min=10.6" make release
|
CFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=10.6" make release
|
||||||
zip nmrpflash-osx.zip nmrpflash
|
zip nmrpflash-osx.zip nmrpflash
|
||||||
|
|
||||||
release/linux: release
|
release/linux: release
|
||||||
|
|
|
@ -303,13 +303,13 @@ struct ethsock *ethsock_create(const char *intf, uint16_t protocol)
|
||||||
#ifndef NMRPFLASH_WINDOWS
|
#ifndef NMRPFLASH_WINDOWS
|
||||||
sock->fd = pcap_get_selectable_fd(sock->pcap);
|
sock->fd = pcap_get_selectable_fd(sock->pcap);
|
||||||
if (sock->fd == -1) {
|
if (sock->fd == -1) {
|
||||||
fprintf(stderr, "No selectable file descriptor available.\n");
|
pcap_perror(sock->pcap, "pcap_get_selectable_fd");
|
||||||
goto cleanup_pcap;
|
goto cleanup_pcap;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
sock->handle = pcap_getevent(sock->pcap);
|
sock->handle = pcap_getevent(sock->pcap);
|
||||||
if (!sock->handle) {
|
if (!sock->handle) {
|
||||||
fprintf(stderr, "No event handle available.\n");
|
pcap_perror(sock->pcap, "pcap_getevent");
|
||||||
goto cleanup_pcap;
|
goto cleanup_pcap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
8
nmrp.c
8
nmrp.c
|
@ -462,6 +462,10 @@ int nmrp_do(struct nmrpd_args *args)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gsock = sock;
|
||||||
|
garp = 0;
|
||||||
|
sigh_orig = signal(SIGINT, sigh);
|
||||||
|
|
||||||
status = is_valid_ip(sock, &ipconf.addr, &ipconf.mask);
|
status = is_valid_ip(sock, &ipconf.addr, &ipconf.mask);
|
||||||
if (status <= 0) {
|
if (status <= 0) {
|
||||||
if (!status) {
|
if (!status) {
|
||||||
|
@ -471,10 +475,6 @@ int nmrp_do(struct nmrpd_args *args)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
gsock = sock;
|
|
||||||
garp = 0;
|
|
||||||
sigh_orig = signal(SIGINT, sigh);
|
|
||||||
|
|
||||||
if (ethsock_set_timeout(sock, args->rx_timeout)) {
|
if (ethsock_set_timeout(sock, args->rx_timeout)) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue