{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1750141622,
"reponame":"libwebsockets",
"desc":"libwebsockets lightweight C networking library",
"owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://libwebsockets.org/repo/libwebsockets",
"f":3,
"items": [
{"schema":"libjg2-1",
"cid":"da189b85e4489e3adea49d24e232d200",
"commit": {"type":"commit",
"time": 1609058522,
"time_ofs": 0,
"oid_tree": { "oid": "965473ca7ec1a3966f43168d8ce9d4120ce8856f", "alias": []},
"oid":{ "oid": "556154c3c966123d7a48f75ba4b3cef8263987db", "alias": []},
"msg": "cpd: trigger if getaddrinfo failed",
"sig_commit": { "git_time": { "time": 1609058522, "offset": 0 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },
"sig_author": { "git_time": { "time": 1608565470, "offset": 0 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }},
"body": "cpd: trigger if getaddrinfo failed\n\nIf getaddrinfo() is not able to reach the server, there may be\na connectivity problem downstream of the device that has not\nbeen recognized by the Captive Portal Detect pieces yet.\n\nIf it looks like that might have happened, used the getaddrinfo()\nreturn to provoke a new CPD scan.\n"
,
"diff": "diff --git a/lib/core-net/client/connect2.c b/lib/core-net/client/connect2.c\nindex 48cc9ff..cc83640 100644\n--- a/lib/core-net/client/connect2.c\n+++ b/lib/core-net/client/connect2.c\n@@ -24,6 +24,10 @@\n \n #include \u0022private-lib-core.h\u0022\n \n+#if !defined(WIN32)\n+#include \u003cnetdb.h\u003e\n+#endif\n+\n #if !defined(LWS_WITH_SYS_ASYNC_DNS)\n static int\n lws_getaddrinfo46(struct lws *wsi, const char *ads, struct addrinfo **result)\n@@ -49,8 +53,30 @@ lws_getaddrinfo46(struct lws *wsi, const char *ads, struct addrinfo **result)\n \t\thints.ai_family \u003d PF_UNSPEC;\n \t}\n \n+\twsi-\u003edns_reachability \u003d 0;\n \tn \u003d getaddrinfo(ads, NULL, \u0026hints, result);\n \n+\t/*\n+\t * Which EAI_* are available and the meanings are highly platform-\n+\t * dependent, even different linux distros differ.\n+\t */\n+\n+\tif (0\n+#if defined(EAI_SYSTEM)\n+\t\t\t|| n \u003d\u003d EAI_SYSTEM\n+#endif\n+#if defined(EAI_NODATA)\n+\t\t\t|| n \u003d\u003d EAI_NODATA\n+#endif\n+#if defined(EAI_FAIL)\n+\t\t\t|| n \u003d\u003d EAI_FAIL\n+#endif\n+\t\t\t) {\n+\t\twsi-\u003edns_reachability \u003d 1;\n+\t\tlwsl_notice(\u0022%s: asking to recheck CPD\u005cn\u0022, __func__);\n+\t\tlws_system_cpd_start(wsi-\u003ea.context);\n+\t}\n+\n \tlwsl_info(\u0022%s: getaddrinfo '%s' says %d\u005cn\u0022, __func__, ads, n);\n \n \treturn n;\ndiff --git a/lib/core-net/private-lib-core-net.h b/lib/core-net/private-lib-core-net.h\nindex 5251fb4..5f22558 100644\n--- a/lib/core-net/private-lib-core-net.h\n+++ b/lib/core-net/private-lib-core-net.h\n@@ -832,6 +832,7 @@ struct lws {\n \tunsigned int\t\t\tskip_fallback:1;\n \tunsigned int\t\t\tfile_desc:1;\n \tunsigned int\t\t\tconn_validity_wakesuspend:1;\n+\tunsigned int\t\t\tdns_reachability:1;\n \n \tunsigned int\t\t\tcould_have_pending:1; /* detect back-to-back writes */\n \tunsigned int\t\t\touter_will_close:1;\n","s":{"c":1750141622,"u": 4195}}
],"g": 5514,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}