~ubuntu-branches/ubuntu/precise/pdnsd/precise

« back to all changes in this revision

Viewing changes to debian/patches/02_backward_compatible_ipv6.patch

  • Committer: Bazaar Package Importer
  • Author(s): Mahyuddin Susanto
  • Date: 2011-03-09 18:54:22 UTC
  • mfrom: (1.3.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110309185422-33hwmg565m18dpu4
Tags: 1.2.8-par-1
* New Maintainer. (Closes: #596302)
* New Upstream Releases. (Closes: #596302, LP: #712938)
* debian/patches/05_fix_spelling.patch: Fix spelling errors.
* debian/patches/04_ipv6_localhost.patch. Adding ipv6 in localhost.
  (Closes: #466332, #504211)
* debian/init.d:
  - Add init status. (Closes: #476538)
  - Don't says starting pdnsd if already started. (Closes: #487467)
* deban/changelog: Fix incorrect date in 1.2.7-par-1 (Closes: #527352)
* debian/control:
  - Add Vcs-Browser and Vcs-Git to alioth.
  - Bump Standards-Version to 3.9.1.
* debian/copyright: Updated as per DEP-5 specification.
* debian/pdnsd-recurse.conf:
  - Adding recurse mode. (Closes: #602262)
  - Fixing recursive neg section. (Closes: #519656)
* doc/pdnsd.conf.in: Separate ip address by new line. Thanks to
  Raphael Geissert. (Closes: #597734)
* perm_cache size set to default. (Closes: #602329)
  - doc/pdnsd.conf.in
  - debian/pdnsd.conf
  - debian/pdnsd-recurse.conf
  - debian/pdnsd-resolvconf.conf
* debian/002_NetMan_pdnsd: add compabilty with WiFi. 
  (Closes: #617373, LP: #452351)
* Ack'd NMU upload. (Closes: #548173)
* Update debconf Indonesian translations. (Closes: #610148)
* Switch to quilt system.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Add backward compability with IPv6
 
2
Author: Pierre Habouzit <madcoder@debian.org>
 
3
Last-Update: Wed, 12 Jan 2011 11:11:29 +0700
 
4
 
 
5
--- pdnsd-1.2.8/src/dns_answer.c        2009-12-18 18:21:49.000000000 +0700
 
6
+++ pdnsd-1.2.8.debian/src/dns_answer.c 2011-01-12 11:04:25.184037770 +0700
 
7
@@ -1334,6 +1334,17 @@ int init_udp_socket()
 
8
 # ifdef ENABLE_IPV6
 
9
        if (!run_ipv4) {
 
10
                if (setsockopt(sock,SOL_IPV6,IPV6_RECVPKTINFO,&so,sizeof(so))!=0) {
 
11
+
 
12
+                       #ifdef IPv6_RECVPKTINFO
 
13
+                       rc = setsockopt(sock,SOL_IPV6,IPV6_RECVPKTINFO,&so,sizeof(so));
 
14
+                       if(rc < 0 && errno == ENOPROTOOPT)
 
15
+                       #endif
 
16
+                       #ifdef IPV6_2292PKTINFO
 
17
+                       rc = setsockopt(sock,SOL_IPV6,IPV6_2292PKTINFO,&so,sizeof(so));
 
18
+                       if(rc < 0 && errno == ENOPROTOOPT)
 
19
+                       #endif
 
20
+                       rc = setsockopt(sock,SOL_IPV6,IPV6_PKTINFO,&so,sizeof(so));
 
21
+               if(rc < 0) {
 
22
                        log_error("Could not set options on udp socket: %s",strerror(errno));
 
23
                        close(sock);
 
24
                        return -1;