Comment 84 for bug 959037

Revision history for this message
Thomas Hood (jdthood) wrote :

> -- Solvable by moving nm-dnsmasq to another port: http://sourceware.org/bugzilla/show_bug.cgi?id=14242

BTW, the required enhancement to glibc shouldn't be difficult to implement. I expect that all we'd have to do is change the following code (around line 313 in resolv/res_init.c) so that it could read a port numeral and save that, instead of NAMESERVER_PORT, in sin_port.

if ((fp = fopen(_PATH_RESCONF, "rce")) != NULL) {
[...]
    while (fgets_unlocked(buf, sizeof(buf), fp) != NULL) {
        [...]
        if (MATCH(buf, "nameserver") && nservall < MAXNS) {
            while (*cp == ' ' || *cp == '\t')
                        cp++;
            if ((*cp != '\0') && (*cp != '\n') && __inet_aton(cp, &a)) {
                statp->nsaddr_list[nservall].sin_addr = a;
                statp->nsaddr_list[nservall].sin_family = AF_INET;
                statp->nsaddr_list[nservall].sin_port = htons(NAMESERVER_PORT);
                nserv++;
            }

There's one more snippet after this dealing with the IPv6 case. That should be it. Any obvious problems I'm overlooking?