{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1753164900,
"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":"2437dd8515491e1c061d0328362f7222",
"commit": {"type":"commit",
"time": 1710919751,
"time_ofs": 0,
"oid_tree": { "oid": "62ff3f44d2808f8c20bebf55ae448679dd3c89d7", "alias": []},
"oid":{ "oid": "e4be3317ee421f951fb16a85c7edacc9b8a0e6aa", "alias": []},
"msg": "netlink: when binding the per-context socket, let the kernel choose the unicast address.",
"sig_commit": { "git_time": { "time": 1710919751, "offset": 0 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },
"sig_author": { "git_time": { "time": 1710846581, "offset": 60 }, "name": "p-luke", "email": "105498880+p-luke@users.noreply.github.com", "md5": "1ba948bfc35ae4ef09d77816168d6f8e" }},
"body": "netlink: when binding the per-context socket, let the kernel choose the unicast address.\n\nWhen using multiple client contextes in a single application, rops_pt_init_destroy_netlink() fails binding the second socket and on - only the first one succeeds. The failure is made obvious by this log:\n W: rops_pt_init_destroy_netlink: netlink bind failed\n\nSo, let's fix this by doing what netlink(7) man page suggests:\n If the application sets nl_pid before calling bind(2), then it is up to the\n application to make sure that nl_pid is unique. If the application sets it\n to 0, the kernel takes care of assigning it. The kernel assigns the process\n ID to the first netlink socket the process opens and assigns a unique nl_pid\n to every netlink socket that the process subsequently creates.\n"
,
"diff": "diff --git a/lib/roles/netlink/ops-netlink.c b/lib/roles/netlink/ops-netlink.c\nindex f81619d..42da915 100644\n--- a/lib/roles/netlink/ops-netlink.c\n+++ b/lib/roles/netlink/ops-netlink.c\n@@ -602,7 +602,6 @@ rops_pt_init_destroy_netlink(struct lws_context *context,\n \n \tmemset(\u0026sanl, 0, sizeof(sanl));\n \tsanl.nl_family\t\t\u003d AF_NETLINK;\n-\tsanl.nl_pid\t\t\u003d (uint32_t)getpid();\n \tsanl.nl_groups\t\t\u003d RTMGRP_LINK | RTMGRP_IPV4_ROUTE | RTMGRP_IPV4_IFADDR\n #if defined(LWS_WITH_IPV6)\n \t\t\t\t | RTMGRP_IPV6_ROUTE | RTMGRP_IPV6_IFADDR\n","s":{"c":1753164900,"u": 5889}}
],"g": 7380,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}