util: dnsmasq: delete assumed capability flags
Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
parent
c8e45725f9
commit
4ddd442687
@ -639,27 +639,9 @@ dnsmasqCapsSetFromBuffer(dnsmasqCaps *caps, const char *buf)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strstr(buf, "--bind-dynamic"))
|
VIR_INFO("dnsmasq version is %d.%d",
|
||||||
dnsmasqCapsSet(caps, DNSMASQ_CAPS_BIND_DYNAMIC);
|
|
||||||
|
|
||||||
/* if this string is a part of the --version output, dnsmasq
|
|
||||||
* has been patched to use SO_BINDTODEVICE when listening,
|
|
||||||
* so that it will only accept requests that arrived on the
|
|
||||||
* listening interface(s)
|
|
||||||
*/
|
|
||||||
if (strstr(buf, "--bind-interfaces with SO_BINDTODEVICE"))
|
|
||||||
dnsmasqCapsSet(caps, DNSMASQ_CAPS_BINDTODEVICE);
|
|
||||||
|
|
||||||
if (strstr(buf, "--ra-param"))
|
|
||||||
dnsmasqCapsSet(caps, DNSMASQ_CAPS_RA_PARAM);
|
|
||||||
|
|
||||||
VIR_INFO("dnsmasq version is %d.%d, --bind-dynamic is %spresent, "
|
|
||||||
"SO_BINDTODEVICE is %sin use, --ra-param is %spresent",
|
|
||||||
(int)caps->version / 1000000,
|
(int)caps->version / 1000000,
|
||||||
(int)(caps->version % 1000000) / 1000,
|
(int)(caps->version % 1000000) / 1000);
|
||||||
dnsmasqCapsGet(caps, DNSMASQ_CAPS_BIND_DYNAMIC) ? "" : "NOT ",
|
|
||||||
dnsmasqCapsGet(caps, DNSMASQ_CAPS_BINDTODEVICE) ? "" : "NOT ",
|
|
||||||
dnsmasqCapsGet(caps, DNSMASQ_CAPS_RA_PARAM) ? "" : "NOT ");
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
@ -68,10 +68,6 @@ typedef struct
|
|||||||
} dnsmasqContext;
|
} dnsmasqContext;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
DNSMASQ_CAPS_BIND_DYNAMIC = 0, /* support for --bind-dynamic */
|
|
||||||
DNSMASQ_CAPS_BINDTODEVICE = 1, /* uses SO_BINDTODEVICE for --bind-interfaces */
|
|
||||||
DNSMASQ_CAPS_RA_PARAM = 2, /* support for --ra-param */
|
|
||||||
|
|
||||||
DNSMASQ_CAPS_LAST, /* this must always be the last item */
|
DNSMASQ_CAPS_LAST, /* this must always be the last item */
|
||||||
} dnsmasqCapsFlags;
|
} dnsmasqCapsFlags;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user