Skip to content

Instantly share code, notes, and snippets.

[exabgp.bgp]
openwait = 2
[exabgp.daemon]
drop = false
user = 'root'
[exabgp.tcp]
bind = '0.0.0.0'
root@fc0d038d7823:/exabgp# ./sbin/exabgp -e /etc/exabgp/exabgp.env /etc/exabgp/exabgp.conf --debug
20:03:41 | 378 | welcome | Thank you for using ExaBGP
20:03:41 | 378 | version | 4.0.2-1c737d99
20:03:41 | 378 | interpreter | 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609]
20:03:41 | 378 | os | Linux fc0d038d7823 4.9.49-moby #1 SMP Fri Dec 8 13:40:02 UTC 2017 x86_64
20:03:41 | 378 | installation | /exabgp
20:03:41 | 378 | cli control | named pipes for the cli are:
20:03:41 | 378 | cli control | to send commands /run/exabgp/exabgp.in
20:03:41 | 378 | cli control | to read responses /run/exabgp/exabgp.out
20:03:41 | 378 | network | listening for BGP session(s) on 0.0.0.0:179
diff --git a/aioh2/helper.py b/aioh2/helper.py
index 345a4e7..3717931 100644
--- a/aioh2/helper.py
+++ b/aioh2/helper.py
@@ -25,19 +25,20 @@ def _split_kwargs(kwargs):
@asyncio.coroutine
-def open_connection(host=None, port=None, *, loop=None, **kwargs):
+def open_connection(host=None, port=None, *, cls=H2Protocol, loop=None,
@chantra
chantra / keybase.md
Created February 14, 2018 04:30
Keybase Proof

Keybase proof

I hereby claim:

  • I am chantra on github.
  • I am chantra (https://keybase.io/chantra) on keybase.
  • I have a public key ASBXkSxjMmfSJVkr9ZAcLqkXHptNFvEy11qkvlxAMWwAewo

To claim this, I am signing this object:

diff --git a/dohproxy/httpproxy.py b/dohproxy/httpproxy.py
index 66d1feb..750618c 100755
--- a/dohproxy/httpproxy.py
+++ b/dohproxy/httpproxy.py
@@ -65,6 +65,8 @@ class DOHApplication(aiohttp.web.Application):
async def resolve(self, request, dnsq):
qid = dnsq.id
+ # Force RD bit
+ dnsq.flags |= dns.flags.RD
@chantra
chantra / reuseport.diff
Created March 21, 2018 18:07
go-dns reuseport
diff --git a/server.go b/server.go
index 685753f..cdf140c 100644
--- a/server.go
+++ b/server.go
@@ -10,6 +10,8 @@ import (
"net"
"sync"
"time"
+
+ "github.com/libp2p/go-reuseport"
diff --git a/reflect/reflect.go b/reflect/reflect.go
index 2baa4b3..f5ffc1e 100644
--- a/reflect/reflect.go
+++ b/reflect/reflect.go
@@ -48,10 +48,11 @@ import (
)
var (
- cpuprofile = flag.String("cpuprofile", "", "write cpu profile to file")
- printf = flag.Bool("print", false, "print replies")
diff --git a/server.go b/server.go
index 685753f..8cf4038 100644
--- a/server.go
+++ b/server.go
@@ -10,6 +10,8 @@ import (
"net"
"sync"
"time"
+
+ "github.com/libp2p/go-reuseport"
diff --git a/reflect/reflect.go b/reflect/reflect.go
index 2baa4b3..5d0953e 100644
--- a/reflect/reflect.go
+++ b/reflect/reflect.go
@@ -38,6 +38,7 @@ import (
"net"
"os"
"os/signal"
+ "runtime"
"runtime/pprof"
diff --git a/plugin/pkg/edns/edns.go b/plugin/pkg/edns/edns.go
index 3f0ea5e1..c058a411 100644
--- a/plugin/pkg/edns/edns.go
+++ b/plugin/pkg/edns/edns.go
@@ -28,8 +28,8 @@ func Version(req *dns.Msg) (*dns.Msg, error) {
o.Hdr.Name = "."
o.Hdr.Rrtype = dns.TypeOPT
o.SetVersion(0)
- o.SetExtendedRcode(dns.RcodeBadVers)
m.Extra = []dns.RR{o}