Hi, While debugging a different issue in my setup I noticed that the IP addresses bacula-sd shows when the director connects are truncated like this:
infra-sd: bnet.c:669-0 who=client host=2001:4d88:1008:4242::38ce:93bf port=36643 The reason for this is a too small buffer in src/lib/bnet_server.c:242, where you allocate a struct sockaddr while a struct sockaddr_storage should be used: infra-sd: bnet_server.c:97-0 sizeof(struct sockaddr) = 16 infra-sd: bnet_server.c:98-0 sizeof(struct sockaddr_storage) = 128 infra-sd: bnet.c:669-0 who=client host=2001:4d88:1008:4242:2e0:81ff:fe51:2c83 port=36643 So, the patch is totally simple, but probably the same issue can be found in a few other places, I guess. As I am not very familiar with the code I would appreciate it if you could check the other places dealing with sockaddrs. By the way, why don’t you use sockaddr_storage and address family-independant socket programming in bacula? Is this again a concern about very old UNIX systems which don’t have these definitions (getaddrinfo, getnameinfo, …)? Or would you be interested in patches? Best regards, Michael
0001-Bugfix-Use-a-large-enough-buffer-for-printing-client.patch
Description: Binary data
------------------------------------------------------------------------------
_______________________________________________ Bacula-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bacula-devel
