Skip to content

Instantly share code, notes, and snippets.

View oprudkyi's full-sized avatar
🇺🇦

Oleksii Prudkyi oprudkyi

🇺🇦
View GitHub Profile
@ndbroadbent
ndbroadbent / gist:5097601
Last active April 29, 2016 02:35
Wrap jQuery events and callbacks with try...catch blocks. Original code from: https://github.com/airbrake/airbrake-js/blob/master/src/notifier.js#L173
/*
* Add hook for jQuery.fn.on function, to manualy call window.Airbrake.captureException() method
* for every exception occurred.
*
* Let function 'f' be binded as an event handler:
*
* $(window).on 'click', f
*
* If an exception is occurred inside f's body, it will be catched here
* and forwarded to captureException method.

How to disable AAAA lookups?

Problem description

The corporate DNS server that is outside of our control doesn't handle AAAA queries properly. When sent a AAAA query, the DNS server doesn't respond. A properly working DNS server returns NOERROR, ANSWER: 0, if there is no AAAA record for a given name. Misconfigured DNS server doesn't send any response.

In an IPv6-enabled environment, the client tries to resolve both A and AAAA addresses. If the DNS server doesn't send any reply, the client repeats the query and eventually times out. Only after the AAAA query times out, the client will use the A address. Waiting for the timeouts renders utilities like curl, kubectl, oc, ... and others unusable.

Identifying the AAAA lookup problem