Skip to content

Instantly share code, notes, and snippets.

View Habbie's full-sized avatar

Peter van Dijk Habbie

View GitHub Profile

Keybase proof

I hereby claim:

  • I am habbie on github.
  • I am habbie (https://keybase.io/habbie) on keybase.
  • I have a public key whose fingerprint is 42D1 9845 DE64 F3E6 39A3 BD16 770A 98F0 92DF 4F99

To claim this, I am signing this object:

@Habbie
Habbie / gist:2c426f666698f3b7fd55
Created February 12, 2015 16:56
freebsd hack for 3.7.1
index fdee0f1..f0b06ad 100644
--- a/pdns_recursor.cc
+++ b/pdns_recursor.cc
@@ -688,6 +688,8 @@ void startDoResolve(void *p)
fillMSGHdr(&msgh, &iov, cbuf, 0, (char*)&*packet.begin(), packet.size(), &dc->d_remote);
if(dc->d_local.sin4.sin_family)
addCMsgSrcAddr(&msgh, cbuf, &dc->d_local);
+ else
+ msgh.msg_control=0;
sendmsg(dc->d_socket, &msgh, 0);
@Habbie
Habbie / gist:107a297695dcac9efe9b
Created February 13, 2015 09:20
full 3.7.1 patch for sendmsg
diff -urN pdns-recursor-git-rec-3.7.1/pdns_recursor.cc pdns-recursor-git-rec-3.7.1-1-g9ce7324/pdns_recursor.cc
--- pdns-recursor-git-rec-3.7.1/pdns_recursor.cc 2015-02-13 10:18:33.000000000 +0100
+++ pdns-recursor-git-rec-3.7.1-1-g9ce7324/pdns_recursor.cc 2015-02-13 10:18:54.000000000 +0100
@@ -688,6 +688,8 @@
fillMSGHdr(&msgh, &iov, cbuf, 0, (char*)&*packet.begin(), packet.size(), &dc->d_remote);
if(dc->d_local.sin4.sin_family)
addCMsgSrcAddr(&msgh, cbuf, &dc->d_local);
+ else
+ msgh.msg_control=NULL;
sendmsg(dc->d_socket, &msgh, 0);
2015-06-16 12:53:59 +0200
./configure
--disable-debug
--disable-dependency-tracking
--disable-silent-rules
--prefix=/usr/local/Cellar/opendbx/1.4.6
--with-backends=sqlite3
configure: WARNING: unrecognized options: --disable-debug, --disable-silent-rules
2015-06-16 12:53:59 +0200
./configure
--disable-debug
--disable-dependency-tracking
--disable-silent-rules
--prefix=/usr/local/Cellar/opendbx/1.4.6
--with-backends=sqlite3
configure: WARNING: unrecognized options: --disable-debug, --disable-silent-rules
def get_random_string(length=12, allowed_chars='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'):
"""
Returns a random string of length characters from the set of a-z, A-Z, 0-9
for use as a salt.
The default length of 12 with the a-z, A-Z, 0-9 character set returns
a 71-bit salt. log_2((26+26+10)^12) =~ 71 bits
"""
import random
try:
@Habbie
Habbie / pdns-recursor-3.1.4-init_d.patch
Created April 22, 2013 10:40
authoritative -> recursing in pdns-recursor.init.d
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
@Habbie
Habbie / pdns-recursor-3.1.4-init_d.patch
Created April 22, 2013 10:18
authoritative -> recursing in pdns-recursor.init.d
blabla
@Habbie
Habbie / pdns-recursor-3.1.4-init_d.patch
Created April 22, 2013 10:39
authoritative -> recursing in pdns-recursor.init.d
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>