Fix exit code from dhcp_release6.

This commit is contained in:
Simon Kelley
2017-12-14 22:40:48 +00:00
parent 0039920ab6
commit a6cee69af4
3 changed files with 10 additions and 3 deletions

View File

@@ -16,6 +16,9 @@ version 2.79
since these are not secure. This behaviour is mandated in since these are not secure. This behaviour is mandated in
RFC-6944. RFC-6944.
Fix incorrect error exit code from dhcp_release6 utility.
Thanks Gaudenz Steinlin for the bug report.
version 2.78 version 2.78
Fix logic of appending ".<layer>" to PXE basename. Thanks to Chris Fix logic of appending ".<layer>" to PXE basename. Thanks to Chris

View File

@@ -265,6 +265,7 @@ uint16_t parse_iana_suboption(char* buf, size_t len)
int16_t parse_packet(char* buf, size_t len) int16_t parse_packet(char* buf, size_t len)
{ {
int16_t ret = -1;
uint8_t type = buf[0]; uint8_t type = buf[0];
/*skipping tx id. you need it, uncomment following line /*skipping tx id. you need it, uncomment following line
uint16_t tx_id = ntohs((buf[1] <<16) + (buf[2] <<8) + buf[3]); uint16_t tx_id = ntohs((buf[1] <<16) + (buf[2] <<8) + buf[3]);
@@ -294,6 +295,8 @@ int16_t parse_packet(char* buf, size_t len)
return status; return status;
} }
/* Got success status, return that if there's no specific error in an IA_NA. */
ret = SUCCESS;
} }
if (option_type == IA_NA ) if (option_type == IA_NA )
@@ -306,7 +309,7 @@ int16_t parse_packet(char* buf, size_t len)
current_pos += option_len; current_pos += option_len;
} }
return -1; return ret;
} }
void usage(const char* arg, FILE* stream) void usage(const char* arg, FILE* stream)

1
debian/changelog vendored
View File

@@ -2,6 +2,7 @@ dnsmasq (2.79-1) unstable; urgency=low
* New upstream. * New upstream.
* Fix trust-anchor regex in init script. (closes: #884347) * Fix trust-anchor regex in init script. (closes: #884347)
* Fix exit code for dhcp_release6 (closes: #833596)
-- Simon Kelley <simon@thekelleys.org.uk> Tue, 7 Sep 2017 22:47:01 +0000 -- Simon Kelley <simon@thekelleys.org.uk> Tue, 7 Sep 2017 22:47:01 +0000