mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
r11973: make it easier to find bugs
metze (This used to be commit 247f90c28d845fd2224cb07ed30d3e8122ba5644)
This commit is contained in:
parent
7da0f7d76d
commit
fd18ab334a
@ -166,7 +166,8 @@ enum ndr_err_code {
|
||||
NDR_ERR_BUFSIZE,
|
||||
NDR_ERR_ALLOC,
|
||||
NDR_ERR_RANGE,
|
||||
NDR_ERR_TOKEN
|
||||
NDR_ERR_TOKEN,
|
||||
NDR_ERR_IPV4ADDRESS
|
||||
};
|
||||
|
||||
enum ndr_compression_alg {
|
||||
|
@ -570,7 +570,11 @@ NTSTATUS ndr_pull_ipv4address(struct ndr_pull *ndr, int ndr_flags, const char **
|
||||
NTSTATUS ndr_push_ipv4address(struct ndr_push *ndr, int ndr_flags, const char *address)
|
||||
{
|
||||
uint32_t addr;
|
||||
if (!is_ipaddress(address)) return NT_STATUS_INVALID_PARAMETER_MIX;
|
||||
if (!is_ipaddress(address)) {
|
||||
return ndr_push_error(ndr, NDR_ERR_IPV4ADDRESS,
|
||||
"Invalid IPv4 address: '%s'",
|
||||
address);
|
||||
}
|
||||
addr = inet_addr(address);
|
||||
NDR_CHECK(ndr_push_uint32(ndr, ndr_flags, htonl(addr)));
|
||||
return NT_STATUS_OK;
|
||||
|
Loading…
x
Reference in New Issue
Block a user