~philip-g-potter/dnsmasq/update-resolvconf

« back to all changes in this revision

Viewing changes to src/util.c

  • Committer: Package Import Robot
  • Author(s): Simon Kelley
  • Date: 2011-09-15 16:33:23 UTC
  • mfrom: (12.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20110915163323-cf1q0y1t6r3xyjkp
Tags: 2.58-3
 * Fix resolvconf script location. (closes: #641717)
 * Update systemd service file. (closes: #640095)

Show diffs side-by-side

added added

removed removed

Lines of Context:
333
333
    }
334
334
  else if (addr->sa.sa_family == AF_INET6)
335
335
    {
 
336
      char name[IF_NAMESIZE];
336
337
      inet_ntop(AF_INET6, &addr->in6.sin6_addr, buf, ADDRSTRLEN);
 
338
      if (addr->in6.sin6_scope_id != 0 &&
 
339
          if_indextoname(addr->in6.sin6_scope_id, name) &&
 
340
          strlen(buf) + strlen(name) + 2 <= ADDRSTRLEN)
 
341
        {
 
342
          strcat(buf, "%");
 
343
          strcat(buf, name);
 
344
        }
337
345
      port = ntohs(addr->in6.sin6_port);
338
346
    }
339
347
#else