public inbox for gwml@vger.gnuweeb.org
 help / color / mirror / Atom feed
* [PATCH gwproxy v10 0/2] Initial work on integration of DNS parser lib in gwproxy
@ 2025-09-10 10:43 Ahmad Gani
  2025-09-10 10:43 ` [PATCH gwproxy v10 1/2] dnsparser: Add dns parser code Ahmad Gani
  2025-09-10 10:43 ` [PATCH gwproxy v10 2/2] gwproxy: refactor code base to add experimental raw DNS backend Ahmad Gani
  0 siblings, 2 replies; 13+ messages in thread
From: Ahmad Gani @ 2025-09-10 10:43 UTC (permalink / raw)
  To: Ammar Faizi; +Cc: Ahmad Gani, Alviro Iskandar Setiawan, GNU/Weeb Mailing List

[[ resend with realloc fixes ]]

Hi Chief,

This is revision v10 of the initial work on the integration of the DNS
parser lib in gwproxy.

There are 2 patches in this series:
- refactor gwproxy codebase (specifically, DNS system)
- add dns parser code

Please give it a test, and thanks for taking a look.

# Changelog
v1 -> v2:
- use existing convert_str_to_ssaddr instead of init_addr
- fix memory leak when init_addr (now it's replaced) failed
- modify convert_str_to_ssaddr to support default port
- bring back __cold attribute on convert_ssaddr_to_str
- don't fill a dangling pointer as Sir Alviro said
- for now it's blocking, attempt_retry label is not needed

v2 -> v3:
- remove TODO(reyuki): hints->ai_family is used to filter results
- make gw_ares_getaddrinfo asynchronous by change UDP socket to non-blocking
- move socket creation to library initialization
- make UDP socket unconnected
- restructure internal struct and program execution flow to support async
- update unit test of dns parser
- transaction id creation is delegated to caller
- fix logic bug in serialize_answ that can lead to memory error: invalid read
- rename parameter prt and split commit message
- move variable declaration in for loop according to the Sir Alviro coding-style

v3 -> v4:
- add else block in the convert_str_to_ssaddr function
- use format specifier %hu for uint16_t in printf
- update base commit to branch master from upstream remote repository

v4 -> v5:
- squash commits to eliminate changes unrelated to the commit subject
- change commit subject: use imperative form for the subject
- update base commit to branch master from upstream remote repository
- changing the email subject
- drop the c-ares style thing
- restructure dnsparser.c and dnsparser.h

v5 -> v6:
- mark this feature as experimental and disabled by default
- fix minor issues from master branch
- fix dns parser
- add dns server as gwproxy' cmdline option
- add fallback mechanism for raw dns backend

v6 -> v7:
- squash commits
- refactor gwproxy codebase (specifically, DNS system)
- add dns parser code

v7 -> v8:
- use __sys_close instead of libc's wrapper close
- add newline at EoF
- fix warning: 'af' may be used uninitialized [-Wmaybe-uninitialized]
- remove break that occured after goto statement

v8 -> v9:
- use a single UDP socket for each gwproxy worker
- expose gwp_dns_ctx members to other source files
- apply revisions from Sir Alviro's review
- apply proposals from Sir Alviro and Sir Ammar

v9 -> v10:
- fix realloc issue

Ahmad Gani (2):
  dnsparser: Add dns parser code
  gwproxy: refactor code base to add experimental raw DNS backend

 Makefile                |   2 +-
 configure               |   8 +
 src/gwproxy/common.h    |   4 +
 src/gwproxy/dns.c       | 254 ++++++++++++++---
 src/gwproxy/dns.h       |  58 +++-
 src/gwproxy/dnsparser.c | 583 ++++++++++++++++++++++++++++++++++++++++
 src/gwproxy/dnsparser.h | 192 +++++++++++++
 src/gwproxy/ev/epoll.c  | 128 ++++++++-
 src/gwproxy/gwproxy.c   | 213 ++++++++++++++-
 src/gwproxy/gwproxy.h   |  89 +++++-
 10 files changed, 1464 insertions(+), 67 deletions(-)
 create mode 100644 src/gwproxy/dnsparser.c
 create mode 100644 src/gwproxy/dnsparser.h


base-commit: b1e70e468bab135a14a8faee3ea535ace9eac211
-- 
Ahmad Gani


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-09-14  4:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-10 10:43 [PATCH gwproxy v10 0/2] Initial work on integration of DNS parser lib in gwproxy Ahmad Gani
2025-09-10 10:43 ` [PATCH gwproxy v10 1/2] dnsparser: Add dns parser code Ahmad Gani
2025-09-10 10:43 ` [PATCH gwproxy v10 2/2] gwproxy: refactor code base to add experimental raw DNS backend Ahmad Gani
2025-09-11 10:11   ` Alviro Iskandar Setiawan
2025-09-12 10:37     ` Ahmad Gani
2025-09-12 14:39       ` Alviro Iskandar Setiawan
2025-09-12 15:49         ` Ammar Faizi
2025-09-12 15:52         ` Ahmad Gani
2025-09-12 16:42           ` Alviro Iskandar Setiawan
2025-09-12 17:00             ` Alviro Iskandar Setiawan
2025-09-14  4:31               ` Ahmad Gani
2025-09-12 17:36     ` Ammar Faizi
2025-09-14  4:34       ` Ahmad Gani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox