]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
remove linuxism
authorBert Hubert <bert.hubert@netherlabs.nl>
Fri, 5 Oct 2012 13:53:09 +0000 (13:53 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Fri, 5 Oct 2012 13:53:09 +0000 (13:53 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2766 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/nameserver.cc

index edcfc763628f495a679886b345fdeb717fd6675c..60195b3f48b93d828e92b7e7d7ea552e1aeb5de6 100644 (file)
@@ -248,7 +248,7 @@ void UDPNameserver::send(DNSPacket *p)
       msgh.msg_controllen = CMSG_SPACE(sizeof(*pkt));
 
       cmsg = CMSG_FIRSTHDR(&msgh);
-      cmsg->cmsg_level = SOL_IP;
+      cmsg->cmsg_level = IPPROTO_IP;
       cmsg->cmsg_type = IP_PKTINFO;
       cmsg->cmsg_len = CMSG_LEN(sizeof(*pkt));
 
@@ -288,7 +288,7 @@ static bool HarvestDestinationAddress(struct msghdr* msgh, ComboAddress* destina
   struct cmsghdr *cmsg;
   for (cmsg = CMSG_FIRSTHDR(msgh); cmsg != NULL; cmsg = CMSG_NXTHDR(msgh,cmsg)) {
 #ifdef IP_PKTINFO
-     if ((cmsg->cmsg_level == SOL_IP) && (cmsg->cmsg_type == IP_PKTINFO)) {
+     if ((cmsg->cmsg_level == IPPROTO_IP) && (cmsg->cmsg_type == IP_PKTINFO)) {
         struct in_pktinfo *i = (struct in_pktinfo *) CMSG_DATA(cmsg);
         destination->sin4.sin_addr = i->ipi_addr;
         destination->sin4.sin_family = AF_INET;
@@ -296,7 +296,7 @@ static bool HarvestDestinationAddress(struct msghdr* msgh, ComboAddress* destina
     }
 #endif
 #ifdef IP_RECVDSTADDR
-    if ((cmsg->cmsg_level == SOL_IP) && (cmsg->cmsg_type == IP_RECVDSTADDR)) {
+    if ((cmsg->cmsg_level == IPPROTO_IP) && (cmsg->cmsg_type == IP_RECVDSTADDR)) {
       struct in_addr *i = (struct in_addr *) CMSG_DATA(cmsg);
       destination->sin4.sin_addr = *i;
       destination->sin4.sin_family = AF_INET;